aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElyse <26639800+elyse0@users.noreply.github.com>2022-11-12 01:13:13 -0600
committerGitHub <noreply@github.com>2022-11-12 12:43:13 +0530
commit0a4b2f4180b57f8e82b5d9c078c070ddfac7c727 (patch)
tree04735403f91685a7ac9f53e17b5b9c7a9e6d7b69
parenta8c754cc00a076f8cba84b477312c35a05cddbc4 (diff)
downloadhypervideo-pre-0a4b2f4180b57f8e82b5d9c078c070ddfac7c727.tar.lz
hypervideo-pre-0a4b2f4180b57f8e82b5d9c078c070ddfac7c727.tar.xz
hypervideo-pre-0a4b2f4180b57f8e82b5d9c078c070ddfac7c727.zip
[extractor/tencent] Fix geo-restricted video (#5505)
Closes #5230 Authored by: elyse0
-rw-r--r--yt_dlp/extractor/tencent.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/yt_dlp/extractor/tencent.py b/yt_dlp/extractor/tencent.py
index 44cd19600..61f300fa4 100644
--- a/yt_dlp/extractor/tencent.py
+++ b/yt_dlp/extractor/tencent.py
@@ -67,9 +67,10 @@ class TencentBaseIE(InfoExtractor):
formats, subtitles = [], {}
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(
- 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:
f.update({'width': video_width, 'height': video_height})
@@ -187,6 +188,10 @@ class VQQVideoIE(VQQBaseIE):
'thumbnail': r're:^https?://[^?#]+s0043cwsgj0',
'series': '青年理工工作者生活研究所',
},
+ }, {
+ # Geo-restricted to China
+ 'url': 'https://v.qq.com/x/cover/mcv8hkc8zk8lnov/x0036x5qqsr.html',
+ 'only_matching': True,
}]
def _real_extract(self, url):