mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-14 08:28:29 +00:00
Merge 7cbe4b5f33
into b7de89c910
This commit is contained in:
commit
a07bfed279
@ -130,7 +130,9 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
post_type = webpage_info['post']['type']
|
post_type = webpage_info['post']['type']
|
||||||
formats, subtitles = [], {}
|
formats, subtitles = [], {}
|
||||||
if post_type == 'podcast':
|
if webpage_info['post'].get('videoUpload'):
|
||||||
|
formats, subtitles = self._extract_video_formats(webpage_info['post']['videoUpload']['id'], canonical_url)
|
||||||
|
if webpage_info['post'].get('podcast_url'):
|
||||||
fmt = {'url': webpage_info['post']['podcast_url']}
|
fmt = {'url': webpage_info['post']['podcast_url']}
|
||||||
if not determine_ext(fmt['url'], default_ext=None):
|
if not determine_ext(fmt['url'], default_ext=None):
|
||||||
# The redirected format URL expires but the original URL doesn't,
|
# The redirected format URL expires but the original URL doesn't,
|
||||||
@ -140,9 +142,7 @@ def _real_extract(self, url):
|
|||||||
'Resolving podcast file extension',
|
'Resolving podcast file extension',
|
||||||
'Podcast URL is invalid').url)
|
'Podcast URL is invalid').url)
|
||||||
formats.append(fmt)
|
formats.append(fmt)
|
||||||
elif post_type == 'video':
|
if not formats:
|
||||||
formats, subtitles = self._extract_video_formats(webpage_info['post']['videoUpload']['id'], canonical_url)
|
|
||||||
else:
|
|
||||||
self.raise_no_formats(f'Page type "{post_type}" is not supported')
|
self.raise_no_formats(f'Page type "{post_type}" is not supported')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user