Hi
I am using Refinitiv Data library to collect news articles in Python, which is working fine.
Any idea of how I can return the list of RICS that the article relates to, just like News Monitor does in Eikon Desktop. I've included a snapshot of what I need below.
Here is my current code:
reg_df = pd.DataFrame(columns=['timestamp_API', 'RIC', 'headline', 'story', 'storyid']) headlines = rd.news.get_headlines('R:TSLA.O', start='2023-09-01T09:00:00', end='2023-11-08T23:59:00', #API is 1hr behind the UK count = 100) headlines = headlines.reset_index() temp_df = pd.DataFrame(columns=['timestamp_API', 'headline', 'story', 'storyid']) for index, row in headlines.iterrows(): newsText = rd.news.get_story(row['storyId'], format=rd.news.Format.TEXT) #get the news story temp_df.loc[index] = [row['versionCreated'], row['headline'], newsText, row['storyId']] time.sleep(1) company_news_df = pd.concat([reg_df, temp_df], ignore_index=True) display(company_news_df)
A snapshot of what I'm after in the dataframe is attached.
Any help greatly appreciated.
Thanks