question

Upvotes
Accepted
1 0 0 1

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

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


从语言的角度可以这样,但这样有局限性。例如英语的,不能确定来源是美国还是英国。如果有地区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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 69 35 53

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea