question

Upvotes
Accepted
9 4 9 17

How to get specific news contents?

Hi,

I have been asking so many time for this. please please don't say I need to take a look at 'api_for_python'

I have looked at the API function in that API Document, but there is no way to get whole news article with thumbnail.


I was just wondering how can i get this sector in python.

if i have to put the specific query when i get the news headlines, please let me know, what is the query for this sector

1702523139035.png

1702523159323.png


and this is my python code for the headlines (I have no idea what the query is supposed to be)

headlines = rd.news.get_headlines(query=topNewsQuery, start='2023-12-01', end='2023-12-15', count=5)

eikon-data-apirefinitiv-dataplatform-eikon#technology#content
1702523139035.png (250.9 KiB)
1702523159323.png (298.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.

1 Answer

· Write an Answer
Upvotes
Accepted
87.7k 294 53 79

@jwlee08

It could be top news

from refinitiv.data.content import news

top_news = news.top_news.hierarchy.Definition().get_data();
top_news.data.df

1702538859688.png

Then, use the topNewsId to get news in the sub-category.

front_page = news.top_news.Definition(top_news.data.df["topNewsId"][0]).get_data()
front_page.data.df

1702538917151.png



1702538859688.png (46.1 KiB)
1702538917151.png (37.6 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.

thanks god. that what im talking about!

and i want to see the image, how can i use that imageId?
or is there any API Documents i can refer to?

@Jirapongse

Please see the answer in this discussion.

You can use the help command to get more information.

help(news)
help(news.images)

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.