tuling-xiaofeng

Results 2 comments of tuling-xiaofeng

> Extra data: line 128 column 2 (char 4697) Traceback (most recent call last): File "weibo.py", line 766, in get_one_weibo weibo = self.get_long_weibo(weibo_id) File "weibo.py", line 351, in get_long_weibo js...

> 这个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` (修改)...