本文介绍了抓住从feedzilla图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我能够得到这样的文章标题和说明,但是我怎么使用feedzilla API得到的消息图像。
新闻资料API文档中提及的任何
解决方案
当你得到你的文章列表(例如的),你可以看到,他们中的一些有所谓的外壳的属性,其中feedzilla看跌期权大约信息制品的可能图像。作为一个例子包含一个图像作为JSON的文章:
<$p$p><$c$c>{\"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, 2014年1月19日14:00:00 +0100\",\"source\":\"Cnet\",\"source_url\":\"http:\\/\\/feeds.feedburner.com\\/newscomauworldnewsndm\",\"summary\":\"ONE在空间历史上最雄心勃勃的任务进入高风险\\ u000amode今天,当彗星追逐探头醒来\\ u000a \\ u000a \\ u000a \\ u000a \\ u000a \\ u000a \\ u000a \\ u000a \\ u000a,称号。 彗星探测器追逐醒来(Cnet)\",\"url\":\"http:\\/\\/news.feedzilla.com\\/en_us\\/stories\\/top-news\\/353840990?client_source=api&format=json\"}请注意,这个属性是可选的。
I am able to get the news data like post title and description but how do I get the news image by using the feedzilla API..
Nothing mentioned in the API documentation
http://w.feedzilla.com/api-overview
解决方案
When you get your list of articles (e.g. http://api.feedzilla.com/v1/categories/26/articles.json) you can see that some of them have an attribute called 'enclosures' where feedzilla puts information about possible images of an article. As an example an article containing an image as 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"}
Note that this attribute is optional.
这篇关于抓住从feedzilla图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!