question

Upvotes
Accepted
1 1 2 8

如何获取新闻的来源国家或地区

想了解如何获取新闻的来源国家或地区,咱们代码可以取到么?感谢


从语言的角度可以这样,但这样有局限性。例如英语的,不能确定来源是美国还是英国。如果有地区tag会很有帮助

headlines=ek.get_news_headlines('R:TSLA.O AND Language:LZH',100) #读取新闻标题

headlines.head()

python apinews
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 Jirapongse ·

pierre.faurel

Hi @Jirapongse @pierre.faurel I saw you helped answer some questions for EIKON-DATA-API, thank you for your great support for our forum. Now we have a question from CSM team and is waiting for reply. I translate this question into English as below. Any suggestions or ideas is welcome! Thanks!


"My question is how we can judge the source Country/Region of one News in our code.

Judging from the used language is not enough. For example, there is one news in English, but it might come from UK or USA.

headlines=ek.get_news_headlines('R:TSLA.O AND Language:LZH',100) #Read the headline of news

headlines.head()"

@Jirapongse Thanks for your reply.

@yu.yang 您好!感谢您参与本论坛并提出问题。不知道Jirapongse的回答是否有支持到您。如果您觉得对解答满意,欢迎您点击‘接纳’按钮,以方便有类似问题的访客检索到问题。如果仍然需要支持,欢迎回复以提供更多信息。谢谢。

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.6k 248 52 74

@yu.yang

The response contains the sourceCode column which specifies the source of news.

1637641930753.png

It doesn't have the source Country/Region in the response.


1637641930753.png (37.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.

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.