BaiduSpider icon indicating copy to clipboard operation
BaiduSpider copied to clipboard

[BUG]search_news()无法使用

Open Allanchao87 opened this issue 2 years ago • 4 comments

描述该问题

按照示例进行操作,调用search_news 出现错误。 `>>> pprint(BaiduSpider().search_news("酸菜", pn=2).plain)

WARNING: An error occurred while executing function ., which is currently ignored. However, the rest of the parsing process is still being executed normally. This is most likely an inner parse failure of BaiduSpider. For more details, please set the environment variable DEBUG to 1 to see the error trace and open up a new issue at https://github.com/BaiduSpider/BaiduSpider/issues/new?assignees=&labels=bug%2C+help+wanted&template=bug_report.md&title=%5BBUG%5D. Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/site-packages/baiduspider/init.py", line 770, in search_news pages = self._calc_pages(result["total"], self.RESULTS_PER_PAGE["news"]) KeyError: 'total'`

复现该问题

按照示例操作

预期结果

应该返回可用的结果

实际结果

错误

系统

MacOS

  • Python版本: Python 3.9.9

其他描述

暂无

Allanchao87 avatar Mar 16 '22 10:03 Allanchao87

看着改源码吧,提交合并再发布还真不知道到哪年 image

glacierck avatar Mar 17 '22 03:03 glacierck

已解决

Allanchao87 avatar Mar 17 '22 12:03 Allanchao87

感谢提出,也很抱歉给您的使用带来不便。请等待 @FHU-yezi 接手。

samzhangjy avatar Mar 25 '22 10:03 samzhangjy

已解决

您好 请问怎么解决的

ShuaiXuan avatar Jun 30 '23 02:06 ShuaiXuan