Limit Google News RSS to specific country

巧了我就是萌 提交于 2020-01-05 07:29:21

问题


This may well be documented somewhere obvious, but I'm not seeing it. I'm parsing Google News results from RSS, but I'm struggling to get the RSS feed to match what I'm seeing online, with results limited to my country.

I'm in South Africa. To see SA news on a topic, I search for the topic in Google News, then select "Pages from South Africa" in the left menu. Although that option is under "The web", it does limit the news results as well.

However, the RSS link in the page footer goes to the generic (ie: not region-specific) news results as if I hadn't selected "pages from..." at all. I've been playing with the parameters in the feed URL, but I haven't found any way to get it to restrict the RSS results to my region. (Similarly: can't find an option to limit a CSE - custom search engine - the same way).

Any ideas?


回答1:


Update: looks like it can't be done - the RSS URL doesn't obey the same rules as the regular searches ("&cr=countryZA"). Manipulating the query string to get the result, and scraping the results out, is in defiance of Google's Ts&Cs.




回答2:


you can use &geo=usa or even use zip code like &geo=99553




回答3:


It can be done like so: https://news.google.com/news/feeds?country=AU?geo=2000

The above URL would limit the RSS output to news in Sydney, Australia.



来源:https://stackoverflow.com/questions/13010323/limit-google-news-rss-to-specific-country

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!