1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-07-05 19:40:08 +02:00

[ie/weibo] Add _download_webpage_handle comment

Authored by: bashonly
This commit is contained in:
bashonly 2024-06-11 23:50:17 -05:00
parent f6f1af31f5
commit f3771c1c0f
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

View File

@ -52,6 +52,7 @@ def _update_visitor_cookies(self, visitor_url, video_id):
})
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)