每日一图
为了方便随机切换图片,我们可以使用必应每日一图来参考写出接口,方便我们切换图片和收集图片。全新代码构建,全新界面。
示例
1、效果
2、一图接口(新增,速度快)
接口:POST请求
https://api.xygeng.cn/openapi/bing
结果:
{
"code": 200,
"data": {
"id": 199,
"time": "20221211",
"title": "国际山岳日",
"url": "https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
"urlbase": "/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552",
"copyright": "泰根塞山脉Roßstein山顶的景色,德国巴伐利亚州 (© Christian Bäck/eStock Photo)",
"copyrightlink": "https://www.bing.com/search?q=%E5%BE%B7%E5%9B%BD%E5%B7%B4%E4%BC%90%E5%88%A9%E4%BA%9A%E5%B7%9E&form=hpcapt&mkt=zh-cn",
"urls": [
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1920x1080.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1366x768.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1280x768.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_1024x768.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_800x600.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_800x480.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_768x1280.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_720x1280.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_640x480.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_480x800.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_400x240.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_320x240.jpg",
"https://cn.bing.com/th?id=OHR.BuchsteinRossstein_ZH-CN4924477552_240x320.jpg"
]
},
"updateTime": 1670756951832
}
3、每日一图
<!-- html -->
<img src="https://api.xygeng.cn/openapi/bing/view" alt="">
<!-- markdown -->
![bing](https://api.xygeng.cn/bing/view)