dongxinjun3944 2013-01-10 07:19
浏览 100
已采纳

从选定城市获取Google新闻RSS Feed

I am fetching Google news from Google News RSS feed. The URL is

http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=n&output=rss

This return all US titles.

[0] => Array
    (
        [title] => Transportation Safety Board Team Probes N.Y. Ferry Crash - Bloomberg
        [link] => http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNGDVYrS8J_SXHtPWyYXxxXyKkNaRw&url=http://www.bloomberg.com/news/2013-01-10/transportation-safety-board-team-probes-n-y-ferry-crash.html
        [image] => //nt3.ggpht.com/news/tbn/t9HUK7dtkbtFrM/6.jpg
        [site_title] => Bloomberg
        [story] => The National Transportation Safety Board began an investigation of the rush-hour commuter ferry crash near Manhattan's financial district that sent passengers flying and injured dozens. The NTSB sent an 11-member “go team†to New York yesterday to ...
    )

[1] => Array
    (
        [title] => Obama Cabinet may not meet his own diversity standards - Los Angeles Times
        [link] => http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNGSgKCy6djWVzzCkvphxbK-anvjlw&url=http://www.latimes.com/news/nationworld/nation/la-na-obama-administration-20130110,0,4200106.story
        [image] => //nt2.ggpht.com/news/tbn/CtM74UExtG_E7M/6.jpg
        [site_title] => Los Angeles Times
        [story] => WASHINGTON — Wednesday's "photo of the day" on the White House website showed an unusual sight in Oval Office history — the president surrounded by top advisors, only half of whom are white men. The picture seemed calculated to counter criticism ...
    )

[2] => Array
    (
        [title] => Chris Christie: Master of Disaster - TIME
        [link] => http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNErxzRlmXjDZOAvqU0hMIwYspcnpg&url=http://swampland.time.com/2013/01/09/chris-christie-master-of-disaster/
        [image] => //nt3.ggpht.com/news/tbn/XyB4G4Cfox0EOM/6.jpg
        [site_title] => TIME
        [story] => This morning on NBC's Today Show, Chris Christie reacted to being on the brand new cover of TIME. The full cover story will be available on time.com later today and on newsstands Friday. Gov. Christie was featured as one of 13 members in TIME's Class of ...
    )

But I just want the news from California or XYZ. Is there a way to add a city name in parameter or any other solution? Thank you.

  • 写回答

1条回答 默认 最新

  • dongluo8303 2013-01-10 07:27
    关注

    You need to just change value of ned and hl parameters in Url like following url you can see different news .

    http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=n&output=rss
    

    Spanish News

    https://news.google.com/news/feeds?cf=all&ned=es_cu&hl=es&output=rss
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 C++使用Gunplot
  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)