cv-cat / Spider_XHS

小红书爬虫,小红书笔记、主页、搜索爬取
772 stars 150 forks source link

search报错 #32

Open rikatinghuang opened 2 months ago

rikatinghuang commented 2 months ago

Traceback (most recent call last): File "/Users/tinghuang/Spider_XHS/search.py", line 95, in search.main(info) File "/Users/tinghuang/Spider_XHS/search.py", line 79, in main self.handle_note_info(query, number, sort, need_cover=True) File "/Users/tinghuang/Spider_XHS/search.py", line 55, in handle_note_info ret = js.call('get_xs', api, data, self.cookies['a1']) TypeError: 'NoneType' object is not subscriptable

cv-cat commented 2 months ago

cookies没设置把

iiweniiang commented 1 month ago

Traceback (most recent call last): File "/Users/tinghuang/Spider_XHS/search.py", line 95, in search.main(info) File "/Users/tinghuang/Spider_XHS/search.py", line 79, in main self.handle_note_info(query, number, sort, need_cover=True) File "/Users/tinghuang/Spider_XHS/search.py", line 55, in handle_note_info ret = js.call('get_xs', api, data, self.cookies['a1']) TypeError: 'NoneType' object is not subscriptable

先执行 npm i jsdom 就可以了