question

Upvotes
Accepted
1 0 0 3

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

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


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

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

headlines.head()

newspython api
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

Upvotes
Accepted
47.4k 111 44 60

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