Dear, I am using eikon library to try to get the HNXB (Hanoi Stock Exchange Bond market news) data excel file or the data set in those news screen. Does anyone try it yet?
Hi @khangdiep,
As the URL that can be used for downloading the excel file in get_news_story is CPURL, which can be accessed using Eikon desktop only. (Please see the example of CPURL in the picture below.) Hence, to download the files, Eikon desktop need to be used to launch these CPURLs
As the python environment on your local machine cannot download the files directly (it has no Eikon's desktop session, only has API session), however, you can use python to send the URLs to Eikon using Eikon side by side integration API then the files will be downloaded.
you may check how to do so in the selected answer in the thread below
https://community.developers.refinitiv.com/questions/80141/getting-data-frame-directly-from-using-news-api.html
@khangdiep So to get all news from the HNXB source please try:
headlines = ek.get_news_headlines('Source:HNXB',count=100)headlines
If you want to get the actual text of the news stories you can use the second news api call, get_news_story:
from IPython.display import HTMLstory = ek.get_news_story(headlines['storyId'][0])HTML(story)
I hope this can help.
Hi Jason , thanks for your response but my purpose is not getting the news or the text, each news has a link to the excel file. My goal is to get the EXCEL FILE or the Data Set in Excel file.