从feedzilla抓取图像

时间:2013-02-10 12:28:54

标签: html json api rss feed

我可以获取帖子标题和说明等新闻数据,但如何使用feedzilla API获取新闻图片。

API文档中没有提及

http://w.feedzilla.com/api-overview

1 个答案:

答案 0 :(得分:2)

当您获得文章列表(例如http://api.feedzilla.com/v1/categories/26/articles.json)时,您会发现其中一些文件具有名为“附件”的属性,其中Feedzilla会提供有关文章可能图像的信息。例如,包含图像为JSON的文章:

{"enclosures":[{"length":3489,"media_type":"image\/jpeg","uri":"http:\/\/news.com.au.feedsportal.com\/c\/34564\/f\/632403\/e\/1\/s\/36174fe5\/l\/0Lresources30Bnews0N0Bau0Cimages0C20A140C0A10C190C122680A50C4485310Erosetta0Bjpg\/448531-rosetta.jpg"}],"publish_date":"Sun, 19 Jan 2014 14:00:00 +0100","source":"Cnet","source_url":"http:\/\/feeds.feedburner.com\/newscomauworldnewsndm","summary":"ONE of the most ambitious missions in the history of space goes into high-risk\u000amode today when a comet-chasing probe wakes up.\u000a\u000a\u000a\u000a\u000a\u000a\u000a\u000a\u000a","title":"Comet-chasing probe to wake up (Cnet)","url":"http:\/\/news.feedzilla.com\/en_us\/stories\/top-news\/353840990?client_source=api&format=json"}

请注意,此属性是可选的。