个人博客中需要获取bing每日一图的地址,特此记录一下。

bing每日一图

  • 根据原始接口结果进行拼接
    接口地址:https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1
    获取结果如下所示:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    {
    "images": [
    {
    "startdate": "20220718",
    "fullstartdate": "202207181600",
    "enddate": "20220719",
    // 图片地址
    "url": "/th?id=OHR.FraueninselChiemsee_ZH-CN3541482552_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
    "urlbase": "/th?id=OHR.FraueninselChiemsee_ZH-CN3541482552",
    "copyright": "基姆湖上的淑女岛,德国巴伐利亚州 (© Malorny/Getty Images)",
    "copyrightlink": "https://www.bing.com/search?q=%E5%9F%BA%E5%A7%86%E6%B9%96&form=hpcapt&mkt=zh-cn",
    "title": "“巴伐利亚海”中的岛屿",
    "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220718_FraueninselChiemsee%22&FORM=HPQUIZ",
    "wp": true,
    "hsh": "747b7651e0b6fe29c3d0bc9a344b42d6",
    "drk": 1,
    "top": 1,
    "bot": 1,
    "hs": []
    }
    ],
    "tooltips": {
    "loading": "正在加载...",
    "previous": "上一个图像",
    "next": "下一个图像",
    "walle": "此图片不能下载用作壁纸。",
    "walls": "下载今日美图。仅限用作桌面壁纸。"
    }
    }

bing每日一图的完整地址为https://cn.bing.com+ 上述结果中的images[0].url,即 https://cn.bing.com/th?id=OHR.FraueninselChiemsee_ZH-CN3541482552_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp

其他图片获取方式