weibo-search icon indicating copy to clipboard operation
weibo-search copied to clipboard

修改后的版本仍在存在原来的问题”attributeError: 'NoneType' object has no attribute 'split' “ 的解决方法

Open Lan-ce-lot opened this issue 3 years ago • 6 comments

#282 关于这个pr之后,有同学仍然存在”attributeError: 'NoneType' object has no attribute 'split' “ 我猜测是网页版微博不同版本对应的cookie不同导致 旧版:

image

新版:

image

目前没有二者兼容的解决方法,只能你切一下网页版微博版本到新版本,然后获取新版本的cookie。切换方法如下: https://page.sm.cn/blm/midpage-317/index?h=www.jingyanlib.com&id=12_8ec5d8728d9c00a4a53f936b85721a79

希望对你们有帮助。😀

Lan-ce-lot avatar Mar 11 '23 15:03 Lan-ce-lot

感谢建议,非常有帮助

dataabc avatar Mar 12 '23 15:03 dataabc

我获取了新版本微博的cookie,还是会报attributeError: 'NoneType' object has no attribute 'split' 的错。

Dey458 avatar Mar 16 '23 10:03 Dey458

新版本有同样问题

HowardZhang002 avatar Mar 21 '23 04:03 HowardZhang002

参见:https://github.com/dataabc/weibo-search/pull/357/commits/73698fd5ca02254efedb290fd8a3a4cdc7aa512e

将p[@class="from"]改为div[@class="from"]

有3个地方

memset-c avatar Apr 19 '23 08:04 memset-c

https://github.com/dataabc/weibo-search/issues/254#issuecomment-1245660105

Lan-ce-lot avatar Apr 19 '23 08:04 Lan-ce-lot

只能使用Chrome这个浏览器进行爬取吗

Gaomr153 avatar Feb 18 '25 09:02 Gaomr153