mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-25 08:35:50 +01:00
[udemy] Extract stream URLs (closes #16372)
This commit is contained in:
parent
789b7774a7
commit
0ce76801e8
@ -105,7 +105,7 @@ class UdemyIE(InfoExtractor):
|
|||||||
% (course_id, lecture_id),
|
% (course_id, lecture_id),
|
||||||
lecture_id, 'Downloading lecture JSON', query={
|
lecture_id, 'Downloading lecture JSON', query={
|
||||||
'fields[lecture]': 'title,description,view_html,asset',
|
'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):
|
def _handle_error(self, response):
|
||||||
@ -303,9 +303,10 @@ class UdemyIE(InfoExtractor):
|
|||||||
'url': src,
|
'url': src,
|
||||||
})
|
})
|
||||||
|
|
||||||
download_urls = asset.get('download_urls')
|
for url_kind in ('download', 'stream'):
|
||||||
if isinstance(download_urls, dict):
|
urls = asset.get('%s_urls' % url_kind)
|
||||||
extract_formats(download_urls.get('Video'))
|
if isinstance(urls, dict):
|
||||||
|
extract_formats(urls.get('Video'))
|
||||||
|
|
||||||
view_html = lecture.get('view_html')
|
view_html = lecture.get('view_html')
|
||||||
if view_html:
|
if view_html:
|
||||||
|
Loading…
Reference in New Issue
Block a user