summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/weibo.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
commitfd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch)
treee1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/weibo.py
parentReleasing progress-linux version 2024.05.27-1~progress7.99u1. (diff)
downloadyt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz
yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/weibo.py')
-rw-r--r--yt_dlp/extractor/weibo.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/yt_dlp/extractor/weibo.py b/yt_dlp/extractor/weibo.py
index b6a6593..b5c0e92 100644
--- a/yt_dlp/extractor/weibo.py
+++ b/yt_dlp/extractor/weibo.py
@@ -34,7 +34,7 @@ class WeiboBaseIE(InfoExtractor):
'browser': f'Chrome{chrome_ver},0,0,0',
'fonts': 'undefined',
'screenInfo': '1920*1080*24',
- 'plugins': ''
+ 'plugins': '',
}, separators=(',', ':'))}))['data']
self._download_webpage(
@@ -52,6 +52,7 @@ class WeiboBaseIE(InfoExtractor):
})
def _weibo_download_json(self, url, video_id, *args, fatal=True, note='Downloading JSON metadata', **kwargs):
+ # XXX: Always fatal; _download_webpage_handle only returns False (not a tuple) on error
webpage, urlh = self._download_webpage_handle(url, video_id, *args, fatal=fatal, note=note, **kwargs)
if urllib.parse.urlparse(urlh.url).netloc == 'passport.weibo.com':
self._update_visitor_cookies(urlh.url, video_id)
@@ -90,7 +91,7 @@ class WeiboBaseIE(InfoExtractor):
'video_details', lambda _, v: v['label'].startswith(format_id), {
'size': ('size', {int_or_none}),
'tbr': ('bitrate', {int_or_none}),
- }
+ },
), get_all=False),
})
return formats
@@ -162,7 +163,7 @@ class WeiboIE(WeiboBaseIE):
'view_count': int,
'like_count': int,
'repost_count': int,
- }
+ },
}, {
'url': 'https://weibo.com/0/4224132150961381',
'note': 'no playback_list example',
@@ -185,7 +186,7 @@ class WeiboVideoIE(WeiboBaseIE):
'ext': 'mp4',
'display_id': 'LEZDodaiW',
'title': '呃,稍微了解了一下靡烟miya,感觉这东西也太二了',
- 'description': '呃,稍微了解了一下靡烟miya,感觉这东西也太二了 http://t.cn/A6aerGsM ​​​',
+ 'description': '呃,稍微了解了一下靡烟miya,感觉这东西也太二了 http://t.cn/A6aerGsM \u200b\u200b\u200b',
'duration': 76,
'timestamp': 1659344278,
'upload_date': '20220801',
@@ -196,7 +197,7 @@ class WeiboVideoIE(WeiboBaseIE):
'view_count': int,
'like_count': int,
'repost_count': int,
- }
+ },
}]
def _real_extract(self, url):