mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-22 20:20:09 +09:00
[udemy] Fix extraction for outputs' format entries without URL (closes #13192)
This commit is contained in:
parent
5192ee17e7
commit
b7f8749304
@ -52,6 +52,10 @@ class UdemyIE(InfoExtractor):
|
|||||||
# new URL schema
|
# new URL schema
|
||||||
'url': 'https://www.udemy.com/electric-bass-right-from-the-start/learn/v4/t/lecture/4580906',
|
'url': 'https://www.udemy.com/electric-bass-right-from-the-start/learn/v4/t/lecture/4580906',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
# no url in outputs format entry
|
||||||
|
'url': 'https://www.udemy.com/learn-web-development-complete-step-by-step-guide-to-success/learn/v4/t/lecture/4125812',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _extract_course_info(self, webpage, video_id):
|
def _extract_course_info(self, webpage, video_id):
|
||||||
@ -219,7 +223,7 @@ class UdemyIE(InfoExtractor):
|
|||||||
|
|
||||||
def extract_output_format(src, f_id):
|
def extract_output_format(src, f_id):
|
||||||
return {
|
return {
|
||||||
'url': src['url'],
|
'url': src.get('url'),
|
||||||
'format_id': '%sp' % (src.get('height') or f_id),
|
'format_id': '%sp' % (src.get('height') or f_id),
|
||||||
'width': int_or_none(src.get('width')),
|
'width': int_or_none(src.get('width')),
|
||||||
'height': int_or_none(src.get('height')),
|
'height': int_or_none(src.get('height')),
|
||||||
|
Loading…
Reference in New Issue
Block a user