NewsAPI返回的搜索字词为零,而这些字词会通过手动搜索返回许多文章

问题描述

当我尝试下面的代码时,我得到0篇文章。但是,当我访问Google新闻时,即使是几天前,也有很多关于同一搜索词的文章发表。我的代码适用于其他搜索字词,为什么不这样做呢?

from newsapi import Newsapiclient
api=Newsapiclient(api_key=apiKey)
import pandas as pd

all_articles=api.get_everything(q='cellulosic ethanol',sources='google-news',from_param='2020-07-12',to='2020-08-12',language='en',page_size=100)

news=pd.DataFrame(all_articles['articles'])
print(len(news))

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)