CCMonkeyss

Results 9 comments of CCMonkeyss

请问解决了吗?我用post模式下载微博主页(如https://weibo.com/u/5885988328)也是出现同样错误。

> 把cookie填到config.json就行,应该不会变慢。可能是被限制了,或者网络问题。 好的,谢谢你,那可能是被限制了,我明天再试试看

我也是无法使用,不过我的错误信息是 Traceback (most recent call last): File "D:\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 974, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Programs\Python\Python311\Lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Programs\Python\Python311\Lib\json\decoder.py", line 337, in...

> 我也是无法使用,不过我的错误信息是 Traceback (most recent call last): File "D:\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 974, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Programs\Python\Python311\Lib\json\decoder.py", line 337,...

> > > headers加上User-Agent信息正常了 > > > > > > 我看“weibo.py”的第101行加了User-Agent参数,换成我自己edge浏览器上的也不行。 > > 代码里User-Agent写成User_Agent了 我改回User-Agent下载大图还是403。

> 感谢反馈,已经修复了。 大佬你好,我更新了weibo.py(重新clone了项目),也更新了cookie, 好像能获取微博的标题,但是下载大图403失败。 即将进行原创微博图片下载 Download progress: 0%| | 0/1 [00:00

感谢🙏按照大佬链接的方法修改了download_one_file,可以下载图片和livephoto了,但是无法下载视频。 需要的朋友可以直接替换def download_one_file。 def download_one_file(self, url, file_path, type, weibo_id): """下载单个文件(图片/视频)""" try: file_exist = os.path.isfile(file_path) need_download = (not file_exist) sqlite_exist = False if "sqlite" in self.write_mode: sqlite_exist = self.sqlite_exist_file(file_path) if not...

> 前几天更新过cookies 今天发现几个小时就会432 Client Error 所以就又跑去更新cookies 然后发现weibo.cn的cookies会多一个SSOLoginState=xxxxxxxxxx的字段 只要存在这个字段就会一直导致432 Client Error 一移除就恢复正常(cookies也是有效的) > > 不知道是不是偶发的问题 但确实移除后就能正常了 最新的代码,移除这个字段后能用了+1