美文网首页
How to get Bing's photo of the d

How to get Bing's photo of the d

作者: zheng7 | 来源:发表于2017-08-09 14:42 被阅读0次

By Mathias Lykkegaard Lorenzen
I think the best way is immitating the way they do it themselves through their AJAX calls.
They call this URL and extract the information through XML deserialization.
XML: http://www.bing.com/HPImageArchive.aspx?format=xml&idx=0&n=1&mkt=en-US
JSON: http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US
RSS: http://www.bing.com/HPImageArchive.aspx?format=rss&idx=0&n=1&mkt=en-US
The mkt attribute can obviously be changed to a different region than ´en-US´, but can also be opted out of entirely if you don't care about a specific region.
Note that the _1366x768.jpg suffix that is added to the image names appears to be modifiable into different resolutions (like _1920x1080.jpg for full HD and possibly others).
例如今天的图片:
http://cn.bing.com/az/hprichbg/rb/ChamonixClouds_ZH-CN7700889231_1366x768.jpg

相关文章

网友评论

      本文标题:How to get Bing's photo of the d

      本文链接:https://www.haomeiwen.com/subject/kexqrxtx.html