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)

Best Answer

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


Answers