Hello, Is there an endpoint to get a list of news sources? I would like to have an overview for querying news and filtering by source among those that I choose to select. For illustration here's a Python snippet:
from typing import List, Iterable
import refinitiv.data as rd
import pandas as pd
def get_news_sources() -> List[str]:
...
def get_news(symbol: str, sources: Iterable[str]) -> pd.DataFrame:
source_filters = "AND ".join([f"SOURCE:{source}" for source in sources])
return rd.news.get_headlines(query=f"R:{symbol} {source_filters}")
sources = get_news_sources()
selected_sources = ...
ticker = ...
headlines = get_news(ticker, filter(lambda x: x in selected_sources, sources)
display(headlines)