Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 4 4

Eikon API extract table from the news

Hi,

I used eikon api to extract the news with news id, however, the output is in URL format. I am wondering how I can extract the table from the news.

The news id is

'urn:newsml:newswire.refinitiv.com:20221207:nL4N32X0DW:1'


pls check the pics below, one is the output from the code and the other is the expected output from the newscapture.png1670536702462.png

eikon-data-api#technologyapinews
capture.png (232.8 KiB)
1670536702462.png (88.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @rayr.hou ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
24.7k 54 17 14

Hello @rayr.hou

Thank you for contacting us. This is an expected behavior, the News data always returns raw content with embedded raw HTML formatting. The application needs to parse and display it.

If you are using Jupyter Notebook, you can use the IPython.display.HTML object to parse the story data as follows:

from IPython.display import HTML
story_id = 'urn:newsml:newswire.refinitiv.com:20221207:nL4N32X0DW:1'
story = ek.get_news_story(story_id)
HTML(story)

Result:

news-eikon.png

Please see more detail on the Eikon_Data_API_News.ipynb example code in the CodeBook app.


news-eikon.png (75.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.