diff options
| author | 2023-11-27 17:57:01 -0500 | |
|---|---|---|
| committer | 2023-11-27 17:57:01 -0500 | |
| commit | 2a817af4fe41289fa705bdc5ee61372333f43996 (patch) | |
| tree | 544d884724e98184afc1d982f0e9fa59137ef498 /gallery_dl/extractor/weibo.py | |
| parent | 7997fa94c82f9a6db63421c0af433f325a8aa607 (diff) | |
New upstream version 1.26.3.upstream/1.26.3
Diffstat (limited to 'gallery_dl/extractor/weibo.py')
| -rw-r--r-- | gallery_dl/extractor/weibo.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gallery_dl/extractor/weibo.py b/gallery_dl/extractor/weibo.py index ed05e1f..7413b5a 100644 --- a/gallery_dl/extractor/weibo.py +++ b/gallery_dl/extractor/weibo.py @@ -41,9 +41,14 @@ class WeiboExtractor(Extractor): def request(self, url, **kwargs): response = Extractor.request(self, url, **kwargs) - if response.history and "passport.weibo.com" in response.url: - self._sina_visitor_system(response) - response = Extractor.request(self, url, **kwargs) + if response.history: + if "login.sina.com" in response.url: + raise exception.StopExtraction( + "HTTP redirect to login page (%s)", + response.url.partition("?")[0]) + if "passport.weibo.com" in response.url: + self._sina_visitor_system(response) + response = Extractor.request(self, url, **kwargs) return response |
