必应官网:https://cn.bing.com/
返回Json数据的接口
https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1
返回结果:
{
"images": [
{
"startdate": "20190604",
"fullstartdate": "201906041600",
"enddate": "20190605",
"url": "/th?id=OHR.PeruvianRainforest_ZH-CN4066508593_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.PeruvianRainforest_ZH-CN4066508593",
"copyright": "秘鲁亚马逊坦博帕塔国家保护区中的树冠 (© Patrick Brandenburg/Tandem Stills + Motion)",
"copyrightlink": "http://www.bing.com/search?q=%E6%A0%91%E5%86%A0&form=hpcapt&mkt=zh-cn",
"title": "",
"quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20190604_PeruvianRainforest%22&FORM=HPQUIZ",
"wp": true,
"hsh": "73a0f621c340498bb1abbfb4abf79258",
"drk": 1,
"top": 1,
"bot": 1,
"hs": []
}
],
"tooltips": {
"loading": "正在加载...",
"previous": "上一个图像",
"next": "下一个图像",
"walle": "此图片不能下载用作壁纸。",
"walls": "下载今日美图。仅限用作桌面壁纸。"
}
}
其中字段url
就是图片地址,但是只有一半,需要加一个前缀。
地址前缀https://www.bing.com/
和http://s.cn.bing.net
都可以。
即完整的图片地址为
http://s.cn.bing.net/th?id=OHR.PeruvianRainforest_ZH-CN4066508593_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp
或者
https://www.bing.com/th?id=OHR.PeruvianRainforest_ZH-CN4066508593_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp