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 0 0 1

Python. Get_Story results - format differences.

For one story I got different result for TEXT and HTML formats. The example is below:

import refinitiv.data as rd

from datetime import timedelta

from IPython.display import HTML


rd.open_session()

url = "urn:newsml:newswire.refinitiv.com:20230828:nL4N3A91S1:1"

story = rd.news.get_story(url, format=rd.news.Format.HTML)

rd.close_session()


HTML format contains a subtitle unlike text format:

"Aug 28 (Reuters)</span><span class="tr-dl-sep"> - </span>U.S. oil refiners are expected to have about 912,000 barrels per day (bpd) of capacity offline for the week ending Sept. 1, decreasing available refining capacity by 410,000 bpd, research company IIR Energy said on Monday.</p>"


Is it bug?

eikon-data-apipython#technology#product
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.

Upvotes
Accepted
26.3k 61 17 14

Hello @alexander.shkurin01

Please be informed that the issue has been fixed in Refinitiv Data Library for Python version 1.4.0 (https://pypi.org/project/refinitiv-data/1.4.0/).

HTML:

html.png

TEXT:

text.png

You can upgrade the library with the following command:

pip install refinitiv-data==1.4.0

or

pip install refinitiv-data --upgrade

html.png (50.9 KiB)
text.png (56.0 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.

Upvote
26.3k 61 17 14

Hello @alexander.shkurin01

I can replicate the issue with the "desktop.workspace" session. The "rd.news.Format.TEXT" output does not has "U.S. oil refiners are expected to have about 912,000 barrels per day (bpd) of capacity offline for the week ending Sept. 1, decreasing available refining capacity by 410,000 bpd, research company IIR Energy said on Monday." text like the "rd.news.Format.HTML" output.

However, I cannot replicate the issue when using the Library "platform.rdp" session. The outputs' content of 2 formats are identical.

html-rdp.png

text-rdp.png

I am contacting the Data Library team. In the meantime, I suggest you use the "platform.rdp" session if possible.

  • The "platform.rdp" needs RDP credentials
  • Some content set like TR Fields are not available on the "platform.rdp" session



html-rdp.png (51.0 KiB)
text-rdp.png (49.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.

Upvotes
1 0 0 1

@wasin.w Thank you for your quick response. I try to use HTML format for further processing and my purposes. Please, let me know, if you have any updates in this case.

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.

Upvotes
1 0 0 1

Hello @wasin.w!

It's working. Thank you!

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.