前段时间用Flask搭建了一个图库用来存放和整理图片。
图库地址:https://img_api.yuubari.cn
最近想着怎么把它用起来,于是做了一个api接口,返回随机图片。
随机图片api接口:https://img_api.yuubari.cn/api/random_image
该接口会返回一个带有图片链接和图片信息的的json文件:
{
"image": {
"deleted": 0,
"file_path": "https://img_api.yuubari.cn/file/Yande.re/jpg/000/276/276479.jpg",
"format": ".jpg",
"height": 1080,
"name": "276479.jpg",
"original": 0,
"rating": "s",
"size": 2170968,
"source": "yande.re",
"source_id": "y276479",
"tags": [
"wallpaper",
"endcard",
"dress",
"thighhighs",
"detexted",
"boku_wa_tomodachi_ga_sukunai",
"boku_wa_tomodachi_ga_sukunai_next",
"hasegawa_kobato",
"kashiwazaki_sena",
"kobuichi"
],
"thumbnail_path": "https://img_api.yuubari.cn/thumbnail/jpg/276479.jpg",
"width": 1920
},
"status": "success"
}
接口每天访问上限1000次。
接口演示地址:随机图片API演示
评论