Lan-ce-lot / pythorch-text-classification

对豆瓣影评进行文本分类情感分析,利用爬虫豆瓣爬取评论,进行数据清洗,分词,采用BERT、CNN、LSTM等模型进行训练,采用tensorboardX可视化训练过程,自然语言处理项目\A project for text classification, based on torch 1.7.1
https://lan-ce-lot.github.io/pythorch-text-classification/
Apache License 2.0
109 stars 9 forks source link

延长爬虫时间没有用 #5

Closed passermyh closed 1 year ago

passermyh commented 1 year ago

已经把sleep时间加到20了还是只能爬两三百条

Lan-ce-lot commented 1 year ago

确实存在这个问题,我修改一下代码。 猜测是豆瓣评论还在加载导致漏掉了一些评论,因为他的预加载机制,页面好了但是评论还没有加载出来 解决方法:

例如https://movie.douban.com/subject/26613692/comments?start=200&limit=20&status=P&sort=new_score&comments_only=1

BTW,感谢指出问题

Lan-ce-lot commented 1 year ago

已经把sleep时间加到20了还是只能爬两三百条

已更新 https://github.com/Lan-ce-lot/pythorch-text-classification/commit/9dfcdf6448c5e6d588308313936c4450d2381a25