question

Upvotes
Accepted
1 1 1 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.

1 Answer

· Write an Answer
Upvotes
Accepted
78.1k 246 52 72

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