aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-05-25 22:28:26 +0700
committerSergey M․ <dstftw@gmail.com>2017-05-25 22:28:26 +0700
commitb7f8749304aca8e8f338f40a1b2877e4ac732c73 (patch)
tree8c75ac754e40b08afbb6616f900a98f9cc506261
parent5192ee17e79ec103abf1e5a06faa0b0019ab00f2 (diff)
[udemy] Fix extraction for outputs' format entries without URL (closes #13192)
-rw-r--r--youtube_dl/extractor/udemy.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py
index dae1aa3c6..160be1b1b 100644
--- a/youtube_dl/extractor/udemy.py
+++ b/youtube_dl/extractor/udemy.py
@@ -52,6 +52,10 @@ class UdemyIE(InfoExtractor):
# new URL schema
'url': 'https://www.udemy.com/electric-bass-right-from-the-start/learn/v4/t/lecture/4580906',
'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):
@@ -219,7 +223,7 @@ class UdemyIE(InfoExtractor):
def extract_output_format(src, f_id):
return {
- 'url': src['url'],
+ 'url': src.get('url'),
'format_id': '%sp' % (src.get('height') or f_id),
'width': int_or_none(src.get('width')),
'height': int_or_none(src.get('height')),