diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-05-08 22:33:35 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-05-08 22:33:35 +0700 |
commit | 0ce76801e8f6e4d69182c20d9cef4de772555ad7 (patch) | |
tree | 143ee53086961dcc45b130a9165d3ce1483d1e9c /youtube_dl/extractor | |
parent | 789b7774a771335c7d0b42c834195bef2e8617c8 (diff) |
[udemy] Extract stream URLs (closes #16372)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/udemy.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py index bf1134e3f..4664e6222 100644 --- a/youtube_dl/extractor/udemy.py +++ b/youtube_dl/extractor/udemy.py @@ -105,7 +105,7 @@ class UdemyIE(InfoExtractor): % (course_id, lecture_id), lecture_id, 'Downloading lecture JSON', query={ 'fields[lecture]': 'title,description,view_html,asset', - 'fields[asset]': 'asset_type,stream_url,thumbnail_url,download_urls,data', + 'fields[asset]': 'asset_type,stream_url,thumbnail_url,download_urls,stream_urls,data', }) def _handle_error(self, response): @@ -303,9 +303,10 @@ class UdemyIE(InfoExtractor): 'url': src, }) - download_urls = asset.get('download_urls') - if isinstance(download_urls, dict): - extract_formats(download_urls.get('Video')) + for url_kind in ('download', 'stream'): + urls = asset.get('%s_urls' % url_kind) + if isinstance(urls, dict): + extract_formats(urls.get('Video')) view_html = lecture.get('view_html') if view_html: |