Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by 82LL35910622 · Feb 17, 2020 at 06:23 PM · api news

Problem with get_news_story function

Hello,

I am trying to retrieve news data with Eikon API using Python. The function get_news_headlines works fine but if I try to get news texts using get_news_story I get the following:

In most of cases: "http://filings.retrieval.service.ib.thomsonone.com/Filings.Viewer/Down..." without text!

Other cases: "storyContent * {border-color:inherit !important;outline-colo..." with the news text correctly.

I tried to put in some sleeptime (time.sleep()). Without success.

Could you help me?


People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by chavalit.jintamalit · Feb 18, 2020 at 03:23 AM

Hi @82LL35910622

I just tested this code:

get headline

headlines=ek.get_news_headlines('R:YPFD.BA IN SPANISH', date_from='2019-03-06T09:00:00', date_to='2019-04-06T18:00:00') headlines

And then get a story

df = newsText = ek.get_news_story('urn:newsml:reuters.com:20190404:nGLF70jBtR:2')

Here is the result:

<div class="storyContent" lang="es"><p><a href="reuters://screen/verb=Open/url=cpurl%3A%2F%2Fviews.cp.%2Ffilings%2FFilings.Viewer%2FDownload.aspx%3FContentFormat%3Dpdf%26DocumentId%3D50168946" data-type="cpurl" data-cpurl="cpurl://views.cp./filings/Filings.Viewer/Download.aspx?ContentFormat=pdf&DocumentId=50168946" translate="no">http://filings.retrieval.service.ib.thomsonone.com/Filings.Viewer/Down...</a></p></div>


This is an attachment that you have to open on Eikon Desktop.

data-type="cpurl" data-cpurl="cpurl://views.cp./filings/Filings.Viewer/Download.aspx?ContentFormat=pdf&DocumentId=50168946"


So this news story id does not have any story text but it provides you a CPURL to be open on Eikon Desktop.

(Sorry I misunderstood your previous question)


ahs1.png (77.3 KiB)
ahs2.png (210.7 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by 82LL35910622 · Feb 18, 2020 at 09:50 PM

Hi @chavalit.jintamalit

I have just found the same answer because I was working on the ypf output! I thought in writing to you an anwers with this information. Excellent! thank you. So, do you know how to download this type of files using python without using the eikon platform?

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
chavalit.jintamalit ♦♦ · Feb 19, 2020 at 04:04 AM 0
Share

Sorry but cpurl is only supported in Eikon Desktop.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.
  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges