Weilai Xu
Results
2
comments of
Weilai Xu
这个bug的原因是请求到的html不能被parse成单个json object,而json.loads()只能处理单个json object,导致的结果是无法抓取长微博。估计是微博页面的html结构变了。 出错位置在这里: https://github.com/dataabc/weibo-crawler/blob/0fbc03d80f84d3728993d3693c06462d4bf85d8a/weibo.py#L349-L351 修改为: `html = html[:html.rfind(',')]` `html = html[:html.rfind('][')]` (增加) `html = '{' + html` (修改) `js = json.loads(html, strict=False)`
Same question, but it seems this repository is no longer maintained.