mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-10-06 17:37:08 +02:00
[ie/weibo] Add _download_webpage_handle
comment
Authored by: bashonly
This commit is contained in:
parent
f6f1af31f5
commit
f3771c1c0f
@ -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):
|
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)
|
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':
|
if urllib.parse.urlparse(urlh.url).netloc == 'passport.weibo.com':
|
||||||
self._update_visitor_cookies(urlh.url, video_id)
|
self._update_visitor_cookies(urlh.url, video_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user