开发者

Getting content from Google News

Can I get text from news开发者_运维百科.google.com? When I view code, I see that it's JavaScript, so I can't get the text on the page. Can anybody can help me?


Try the RSS feeds. See:

http://www.google.com/support/news/bin/answer.py?hl=en&answer=59255


Adding &output=rss to the end of many Google News URLs allows you to get the results in an XML/RSS format instead of as a mix of JavaScript and HTML.

For example, http://news.google.co.th/news/search?&q=facebook&output=rss.

PHP has a variety of XML libraries that could be used to parse the content, but I am not familiar enough with them to produce example code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜