mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-15 13:47:48 +01:00
[bpb] Fix extraction (closes #14043)
This commit is contained in:
parent
d7c7100e3d
commit
0cbb841ba9
@ -33,13 +33,13 @@ class BpbIE(InfoExtractor):
|
|||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'<h2 class="white">(.*?)</h2>', webpage, 'title')
|
r'<h2 class="white">(.*?)</h2>', webpage, 'title')
|
||||||
video_info_dicts = re.findall(
|
video_info_dicts = re.findall(
|
||||||
r"({\s*src:\s*'http://film\.bpb\.de/[^}]+})", webpage)
|
r"({\s*src\s*:\s*'https://film\.bpb\.de/[^}]+})", webpage)
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for video_info in video_info_dicts:
|
for video_info in video_info_dicts:
|
||||||
video_info = self._parse_json(video_info, video_id, transform_source=js_to_json)
|
video_info = self._parse_json(video_info, video_id, transform_source=js_to_json)
|
||||||
quality = video_info['quality']
|
|
||||||
video_url = video_info['src']
|
video_url = video_info['src']
|
||||||
|
quality = 'high' if re.search(r'_high\.', video_url) else 'low'
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'preference': 10 if quality == 'high' else 0,
|
'preference': 10 if quality == 'high' else 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user