[Weibo] 403 Forbidden on account links
gallery-dl --verbose https://weibo.com/u/1946014685
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <Version 1.31.0-dev>
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <Python 3.13.2 - Windows-10-10.0.19045-SP0>
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <requests 2.32.5 - urllib3 2.5.0>
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <Configuration Files ['%APPDATA%\\gallery-dl\\config.json']>
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <Starting DownloadJob for 'https://weibo.com/u/1946014685'>
[10][DEBUG] <weibo> <output.py> <C:\Python313\Lib\site-packages\gallery_dl\output.py> <Using WeiboUserExtractor for 'https://weibo.com/u/1946014685'>
[10][DEBUG] <weibo> <output.py> <C:\Python313\Lib\site-packages\gallery_dl\output.py> <Using WeiboFeedExtractor for 'https://weibo.com/u/1946014685?tabtype=feed'>
[10][DEBUG] <urllib3.connectionpool> <connectionpool.py> <C:\Python313\Lib\site-packages\urllib3\connectionpool.py> <Starting new HTTPS connection (1): weibo.com:443>
[10][DEBUG] <urllib3.connectionpool> <connectionpool.py> <C:\Python313\Lib\site-packages\urllib3\connectionpool.py> <https://weibo.com:443 "GET /ajax/statuses/mymblog?uid=1946014685&feature=0 HTTP/1.1" 403 22>
[40][ERROR] <weibo> <output.py> <C:\Python313\Lib\site-packages\gallery_dl\output.py> <HttpError: '403 Forbidden' for 'https://weibo.com/ajax/statuses/mymblog?uid=1946014685&feature=0'>
[10][DEBUG] <weibo> <output.py> <C:\Python313\Lib\site-packages\gallery_dl\output.py> <>
Traceback (most recent call last):
File "C:\Python313\Lib\site-packages\gallery_dl\job.py", line 154, in run
for msg in extractor:
^^^^^^^^^
File "C:\Python313\Lib\site-packages\gallery_dl\extractor\weibo.py", line 79, in items
for status in self.statuses():
~~~~~~~~~~~~~^^
File "C:\Python313\Lib\site-packages\gallery_dl\extractor\weibo.py", line 220, in _pagination
response = self.request(url, params=params, headers=headers)
File "C:\Python313\Lib\site-packages\gallery_dl\extractor\weibo.py", line 63, in request
response = Extractor.request(self, url, **kwargs)
File "C:\Python313\Lib\site-packages\gallery_dl\extractor\common.py", line 265, in request
raise exc
gallery_dl.exception.HttpError: '403 Forbidden' for 'https://weibo.com/ajax/statuses/mymblog?uid=1946014685&feature=0'
For a couple weeks now I noticed that without being logged in, it would just scrape the first few pages and then stop.
Now it fails entirely
accounts' feed pages seem to be broken in an actual webbrowser too:
adding ?tabtype=album seems to work
adding
?tabtype=albumseems to work
Thanks a lot.It is useful
It's working again:
$ gallery-dl https://weibo.com/u/1946014685
./weibo/只是简言/4420487612350641_01.jpg
./weibo/只是简言/4420487612350641_02.jpg
./weibo/只是简言/4420487612350641_03.jpg
gallery-dl https://weibo.com/u/1946014685
It seems that it still cannot work properly
Its not working again..
gallery-dl --verbose https://weibo.com/u/1946014685
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <Version 1.31.0-dev>
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <Python 3.13.2 - Windows-10-10.0.19045-SP0>
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <requests 2.32.5 - urllib3 2.5.0>
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <Configuration Files ['%APPDATA%\\gallery-dl\\config.json']>
[10][DEBUG] <gallery-dl> <__init__.py> <C:\Python313\Lib\site-packages\gallery_dl\__init__.py> <Starting DownloadJob for 'https://weibo.com/u/1946014685'>
[10][DEBUG] <weibo> <output.py> <C:\Python313\Lib\site-packages\gallery_dl\output.py> <Using WeiboUserExtractor for 'https://weibo.com/u/1946014685'>
[10][DEBUG] <weibo> <output.py> <C:\Python313\Lib\site-packages\gallery_dl\output.py> <Using WeiboFeedExtractor for 'https://weibo.com/u/1946014685?tabtype=feed'>
[10][DEBUG] <urllib3.connectionpool> <connectionpool.py> <C:\Python313\Lib\site-packages\urllib3\connectionpool.py> <Starting new HTTPS connection (1): weibo.com:443>
[10][DEBUG] <urllib3.connectionpool> <connectionpool.py> <C:\Python313\Lib\site-packages\urllib3\connectionpool.py> <https://weibo.com:443 "GET /ajax/statuses/mymblog?uid=1946014685&feature=0 HTTP/1.1" 403 22>
[40][ERROR] <weibo> <output.py> <C:\Python313\Lib\site-packages\gallery_dl\output.py> <HttpError: '403 Forbidden' for 'https://weibo.com/ajax/statuses/mymblog?uid=1946014685&feature=0'>
[10][DEBUG] <weibo> <output.py> <C:\Python313\Lib\site-packages\gallery_dl\output.py> <>
Traceback (most recent call last):
File "C:\Python313\Lib\site-packages\gallery_dl\job.py", line 158, in run
msg = self.dispatch(extractor)
File "C:\Python313\Lib\site-packages\gallery_dl\job.py", line 209, in dispatch
for msg, url, kwdict in messages:
^^^^^^^^
File "C:\Python313\Lib\site-packages\gallery_dl\extractor\weibo.py", line 79, in items
for status in self.statuses():
~~~~~~~~~~~~~^^
File "C:\Python313\Lib\site-packages\gallery_dl\extractor\weibo.py", line 220, in _pagination
response = self.request(url, params=params, headers=headers)
File "C:\Python313\Lib\site-packages\gallery_dl\extractor\weibo.py", line 63, in request
response = Extractor.request(self, url, **kwargs)
File "C:\Python313\Lib\site-packages\gallery_dl\extractor\common.py", line 267, in request
raise exc
gallery_dl.exception.HttpError: '403 Forbidden' for 'https://weibo.com/ajax/statuses/mymblog?uid=1946014685&feature=0'
yt-dlp works :
[debug] Command-line config: ['https://weibo.com/u/1946014685', '-v']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [335653be8]
[debug] Lazy loading extractors is disabled
[debug] Python 3.12.10 (CPython AMD64 64bit) - Windows-11-10.0.26200-SP0 (OpenSSL 3.0.16 11 Feb 2025)
[debug] exe versions: ffmpeg 7.1.1-essentials_build-www.gyan.dev (setts), ffprobe 7.1.1-essentials_build-www.gyan.dev, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.23.0, brotli-1.2.0, certifi-2025.11.12, curl_cffi-0.13.0, mutagen-1.47.0, requests-2.32.5, sqlite3-3.49.1, urllib3-2.5.0, websockets-15.0.1, yt_dlp_ejs-0.3.1
[debug] JS runtimes: deno-2.5.6
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Plugin directories: none
[debug] Loaded 1851 extractors
[WeiboUser] Extracting URL: https://weibo.com/u/1946014685
[WeiboUser] 1946014685: Downloading videos page 1
[WeiboUser] 1946014685: Generating first-visit guest request
[WeiboUser] 1946014685: Running first-visit callback to get guest cookies
[WeiboUser] 1946014685: Downloading videos page 1
[download] Downloading playlist: 只是简言的视频
[WeiboUser] 1946014685: Downloading videos page 2
[WeiboUser] 1946014685: Downloading videos page 3
[WeiboUser] 1946014685: Downloading videos page 4
[WeiboUser] 1946014685: Downloading videos page 5
[WeiboUser] 1946014685: Downloading videos page 6
[WeiboUser] 1946014685: Downloading videos page 7
[WeiboUser] 1946014685: Downloading videos page 8
[WeiboUser] Playlist 只是简言的视频: Downloading 123 items of 123
[download] Downloading item 1 of 123
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec, channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 5240914895179672: Downloading 1 format(s): mp4_1440p60
[debug] Invoking http downloader on "https://f.video.weibocdn.com/o0/InHq5WGflx08txx6cPlS010412019KDr0E010.mp4?label=mp4_1440p60&template=1440x2560.23.0&media_id=5240913484513395&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=4&ot=v&lp=000029H9Ue&ps=mZ6WB&uid=i1Vzo8R&ab=,15568-g4,8012-g2,8013-g0,3601-g38&Expires=1765454667&ssig=voqPhbRqHA&KID=unistore,video"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: #鸣潮[超话]##鸣潮嘉贝丽娜##cosplay# 趣多多版嘉贝莉娜纯享版 [5240914895179672].mp4
[download] 12.3% of 16.31MiB at 2.83MiB/s ETA 00:05
ERROR: Interrupted by user
yt-dlp works
gallery-dl works as well when only extracting videos:
$ gallery-dl -o include=videos https://weibo.com/u/1946014685
./weibo/只是简言/4686492481620694_01.mp4
./weibo/只是简言/4602448969206640_01.mp4
./weibo/只是简言/4591115200108918_01.mp4
It's the feed extractor, which is used by default, that's the problem.
https://github.com/mikf/gallery-dl/issues/8541#issuecomment-3517088130 also works.
It seems like a site issue like the other time, hoping it will clear itself soon. Mobile site https://m.weibo.cn/u/1946014685 works without login
?tabtype=album does work, but I want the retweets, which only appears on the feed.
On the side note, does anyone know the api limits to avoid 403? feed limits and ?tabtype=album are quite different from experience, but I don't have the skillset to deduce explicitly the cutoff.