我在python3.6中使用nytimesarticle包进行抓取。每当我试图寻找时
TypeError: must be str, not bytes.
我正在运行以下代码
from nytimesarticle import articleAPI
api = articleAPI('apikey')
articles = api.search(q="Obama",
fq={"headline": "Obama",
"source": ["Reuters",
"AP",
"The New York Times"]},
begin_date="20161001", # this can also be an int
facet_field=["source", "day_of_week"],
facet_filter=True)
得到以下错误
^{pr2}$
目前没有回答
相关问题 更多 >
编程相关推荐