HairlessVillager / minehotspot

GNU General Public License v2.0
0 stars 2 forks source link

Bug Report: tieba.py #9

Closed BzcLoveXrn closed 1 week ago

BzcLoveXrn commented 1 week ago

@HairlessVillager 问题复现:在控制台输入以下命令爬取贴吧,scrapy crawl tiebapost -a pid=8351704896

image

问题描述:

image 导致运行爬虫的时候,会报错如下: image

image

HairlessVillager commented 1 week ago

对于问题1:

不要修改items.TiebaComment,而是修改爬取的代码。


对于问题2:

uid是表示用户的一个整数,uname是用户的昵称。当前版本的处理逻辑是这样的:

https://github.com/HairlessVillager/minehotspot/blob/87eca65f9b738d9e4d6ff9924f91647af42fdefe/minehotspot/src/scrapy/minehotspot/spiders/tieba.py#L138

这里给出大概的修改思路:

uid=user_id, uname=show_nickname

如果无法获取字段,设置为None即可,必要时可以加注释说明。


另外这个issue写的挺好的,除了一个小问题,就是标题没有起到标题的作用,类似的问题我之前也和你说过,下不为例😥

BzcLoveXrn commented 1 week ago

已修改完善,已提交