Closed MiHess closed 7 years ago
Hi,
just replace
q.addRequestedResult(RequestArticlesUriList())
with
q.setRequestedResult(RequestArticlesUriList())
The reason for the error is that constructor of QueryArticles
by default already sets article list as a return type. In your case, you want return data type to be article URI list, which is why you need to override the default choice. Multiple addRequesterResult()
calls for the same query are allowed only for the paying customers.
It works! Thanks a lot for the quick response!
Hi, I am trying to get the ArticlesUriList as a result of my query, but keep getting the following error:
What are the multiple return types? Is this just not possible in the free plan or am I doing it wrong?
er = EventRegistry(apiKey=API_KEY)
q = QueryArticles()
q.addNewsSource(['www.nytimes.com'])
q.addRequestedResult(RequestArticlesUriList())
print(er.execQuery(q))
Thanks a lot in advance. Mirco