q = "R:VOD.L AND Topic:GB" headlines = tr.get_news_headlines(query=q, date_from=start_date, date_to=end_date, count=100)
Hi, how can I modify the python request above to get:
1. All News
2. A 1000 news, not just 100.
The get_news_headlines() method does define an upper limit of 100 results. When you look at the results based on the date criteria, the request will retrieve the last N headlines, up to 100, based on your date_to specification. For example,
In the above query, my results went back as far as 2018-01-19. Unfortunately, in order for you to retrieve additional headlines, you will have to execute multiple get_news_headlines() queries based on different date ranges.
In addition to the response from @nick.zincone.1 and to answer the first question, to retrieve all news headlines without applying any filters you can use the news query "A". To learn how to construct news filter expressions use the News Monitor app in Eikon application, which provides GUI for constructing news filters. In get_news_headlines method you can use the same news codes and filter expressions that you can use in the News Monitor app in Eikon. If you're not familiar with News Monitor app in Eikon, you can find series of video tutorials by going to the main Eikon menu and selecting Help - Tutorials and Training and typing in "news" in the search box of the Training app.
I'm getting intermittent timeout errors like this:
"HTTPError: Request timeout occured"
With the following code:
q = 'Language:LEN AND ( Topic:GLOFIN OR Topic:TOPNWS ) NOT (Source:TRAUT OR ECLCTA OR ECLTND OR ECLPCM OR ECLBFI OR TOPIC:ENT OR JOB OR SPO OR BACT OR STXOPS OR INTER OR MTPDF OR VID OR REP OR VEN OR INFO OR ORDIMB OR NPL OR WEA OR ENV OR TXT OR PCARD OR INSI OR RSUM OR PREV OR OBIT OR NMKR OR NEWR OR FILING OR ADVS OR AAA OR MEVN OR RCH OR PRO OR PPLMOV)'
headlines = tr.get_news_headlines(query=q, date_from=start_date, date_to=end_date, count=100)
Can you please let me know what can I do to stop these intermittent timeouts?