question

Upvotes
Accepted
9 3 4 10

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.

Hi @jwlee08 ,

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.

Thank you,

AHS

@jwlee08

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
79.1k 250 52 74

@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.