mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-02-05 10:10:10 +09:00
Get HD formats for Reel
This commit is contained in:
parent
fcb4cf1783
commit
24a1061f53
@ -995,7 +995,7 @@ class BBCIE(BBCCoUkIE):
|
|||||||
}
|
}
|
||||||
|
|
||||||
# bbc reel (e.g. https://www.bbc.com/reel/video/p07c6sb6/how-positive-thinking-is-harming-your-happiness)
|
# bbc reel (e.g. https://www.bbc.com/reel/video/p07c6sb6/how-positive-thinking-is-harming-your-happiness)
|
||||||
programme_id = self._search_regex(
|
programme_id = self._search_regex(
|
||||||
r'/reel/video/(?P<id>%s)/' % self._ID_REGEX, url, 'Reel pid', default=None)
|
r'/reel/video/(?P<id>%s)/' % self._ID_REGEX, url, 'Reel pid', default=None)
|
||||||
initial_data = self._parse_json(self._html_search_regex(
|
initial_data = self._parse_json(self._html_search_regex(
|
||||||
r'<script[^>]+id=(["\'])initial-data\1[^>]+data-json=(["\'])(?P<json>(?:(?!\2).)+)',
|
r'<script[^>]+id=(["\'])initial-data\1[^>]+data-json=(["\'])(?P<json>(?:(?!\2).)+)',
|
||||||
@ -1020,22 +1020,22 @@ class BBCIE(BBCCoUkIE):
|
|||||||
'duration': int_or_none(clip_data.get('duration')),
|
'duration': int_or_none(clip_data.get('duration')),
|
||||||
'categories': [topic_title] if topic_title else None,
|
'categories': [topic_title] if topic_title else None,
|
||||||
}
|
}
|
||||||
|
|
||||||
if not programme_id:
|
if not programme_id:
|
||||||
# get the formats from the reel page
|
# get the formats from the reel page
|
||||||
formats, subtitles = self._download_media_selector(version_id)
|
formats, subtitles = self._download_media_selector(version_id)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
ret.update({
|
ret.update({
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
# get the formats (including HD) from the programmes page
|
# get the formats (including HD) from the programmes page
|
||||||
# avoid https: to help proxying
|
# avoid https: to help proxying
|
||||||
ret.update({
|
ret.update({
|
||||||
'_type': 'url_transparent',
|
'_type': 'url_transparent',
|
||||||
'url': 'http://bbc.co.uk/programmes/%s' % programme_id
|
'url': 'http://bbc.co.uk/programmes/%s' % programme_id
|
||||||
})
|
})
|
||||||
return ret
|
return ret
|
||||||
elif programme_id:
|
elif programme_id:
|
||||||
# the Reel page was not as expected: try the programmes page
|
# the Reel page was not as expected: try the programmes page
|
||||||
|
Loading…
Reference in New Issue
Block a user