5
votes

I am trying to build an RSS parser that users Google News RSS. I am able to retrieve news articles from the news URL just by targeting the following URL:

https://news.google.com/news/section?output=rss

However, on the google news page their is an option to retrieve news near your current location. This URL in the browser is:

https://news.google.com/news/section?geo=detect_metro_area

Just adding the output=rss query string parameter is not enough to return the local news in RSS format. Instead, I get a pretty much empty response:

<rss version="2.0">
<channel>
<generator>NFE/1.0</generator>
<title>News near you - Google News</title>
<link>
http://news.google.com/news?pz=1&ned=us&hl=en&geo=detect_metro_area
</link>
<language>en</language>
<webMaster>[email protected]</webMaster>
<copyright>&copy;2012 Google</copyright>
<pubDate>Tue, 20 Nov 2012 19:32:04 GMT</pubDate>
<lastBuildDate>Tue, 20 Nov 2012 19:32:04 GMT</lastBuildDate>
<image>
<title>News near you - Google News</title>
<url>
https://ssl.gstatic.com/news/img/logo/en_us/news.gif
</url>
<link>
http://news.google.com/news?pz=1&ned=us&hl=en&geo=detect_metro_area
</link>
</image>
<description>Google News</description>
</channel>
</rss>

Does anyone know if their is a way to get news that is near you geographically from this RSS feed?

2
It looks like I can get close by adding a nearby city's name in the geo query parameter, like this: news.google.com/news/section?output=rss&geo=Boston, though I would still like to have the webservice figure out the city as part of the query...lehn0058

2 Answers

2
votes

As far as I can tell you will need to determine that your self since the website is required to automatically determine your location using an on device mechanism or logged in user account. However if you would like to query based on news containing a city or area you could do something like this for New York. If you combine that for some on device geo location functions then you should be able to get news for what you would like.

https://news.google.com/news/section?output=rss&q=New%20York

1
votes