aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-05-01 02:15:43 +0700
committerSergey M․ <dstftw@gmail.com>2018-05-01 02:15:43 +0700
commit851396346803f77ab9573af56cae056aa904cf93 (patch)
tree74f4b4dd14c6ed1a0b62fa8473116482cd5fdd84
parent67ca1a8ef7ea6094e1e34518b93cdb5ba59f31b3 (diff)
[udemy] Extract outputs renditions (closes #16289, closes #16291, closes #16320, closes #16321, closes #16334, closes #16335)
-rw-r--r--youtube_dl/extractor/udemy.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py
index 439ed2a89..bf1134e3f 100644
--- a/youtube_dl/extractor/udemy.py
+++ b/youtube_dl/extractor/udemy.py
@@ -58,6 +58,10 @@ class UdemyIE(InfoExtractor):
# 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,
+ }, {
+ # only outputs rendition
+ 'url': 'https://www.udemy.com/how-you-can-help-your-local-community-5-amazing-examples/learn/v4/t/lecture/3225750?start=0',
+ 'only_matching': True,
}]
def _extract_course_info(self, webpage, video_id):
@@ -357,6 +361,12 @@ class UdemyIE(InfoExtractor):
fatal=False)
extract_subtitles(text_tracks)
+ if not formats and outputs:
+ for format_id, output in outputs.items():
+ f = extract_output_format(output, format_id)
+ if f.get('url'):
+ formats.append(f)
+
self._sort_formats(formats, field_preference=('height', 'width', 'tbr', 'format_id'))
return {