mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[extractor/tencent] Fix geo-restricted video (#5505)
Closes #5230 Authored by: elyse0
This commit is contained in:
parent
a8c754cc00
commit
0a4b2f4180
1 changed files with 7 additions and 2 deletions
|
@ -67,9 +67,10 @@ def _extract_video_formats_and_subtitles(self, api_response, video_id):
|
||||||
|
|
||||||
formats, subtitles = [], {}
|
formats, subtitles = [], {}
|
||||||
for video_format in video_response['ul']['ui']:
|
for video_format in video_response['ul']['ui']:
|
||||||
if video_format.get('hls'):
|
if video_format.get('hls') or determine_ext(video_format['url']) == 'm3u8':
|
||||||
fmts, subs = self._extract_m3u8_formats_and_subtitles(
|
fmts, subs = self._extract_m3u8_formats_and_subtitles(
|
||||||
video_format['url'] + video_format['hls']['pt'], video_id, 'mp4', fatal=False)
|
video_format['url'] + traverse_obj(video_format, ('hls', 'pt'), default=''),
|
||||||
|
video_id, 'mp4', fatal=False)
|
||||||
for f in fmts:
|
for f in fmts:
|
||||||
f.update({'width': video_width, 'height': video_height})
|
f.update({'width': video_width, 'height': video_height})
|
||||||
|
|
||||||
|
@ -187,6 +188,10 @@ class VQQVideoIE(VQQBaseIE):
|
||||||
'thumbnail': r're:^https?://[^?#]+s0043cwsgj0',
|
'thumbnail': r're:^https?://[^?#]+s0043cwsgj0',
|
||||||
'series': '青年理工工作者生活研究所',
|
'series': '青年理工工作者生活研究所',
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
# Geo-restricted to China
|
||||||
|
'url': 'https://v.qq.com/x/cover/mcv8hkc8zk8lnov/x0036x5qqsr.html',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
|
Loading…
Reference in a new issue