Giter VIP home page Giter VIP logo

bing-wallpaper's Introduction

bing-wallpaper

该项目利用Vue-cli脚手架,用js获取必应每日壁纸

安装 Inastall with npm

npm install(或者使用淘宝镜像 cnpm install)

运行

npm run dev

浏览器查看:http://localhost:8080/#/

build

npm run build

效果

image

api

//bing.com/HPImageArchive.aspx?format=js&idx=0&n=1
参数
idx:表示请求的天数序列,0代表今天、1代表昨天…以此类推(只支持最近7天)
n:表示请求的天数数量(请求几天的图片);1为当天一天、2为昨天和今天
数据返回
{
  "images": [{
    "startdate": "20171207",
    "fullstartdate": "201712071600",
    "enddate": "20171208",
    "url": "/az/hprichbg/rb/SibeliusMonument_ZH-CN8903164725_1920x1080.jpg",
    "urlbase": "/az/hprichbg/rb/SibeliusMonument_ZH-CN8903164725",
    "copyright": "西贝柳斯纪念碑,芬兰赫尔辛基 (© Ville Heino/500px)",
    "copyrightlink": "http://www.bing.com/search?q=%E8%A5%BF%E8%B4%9D%E6%9F%B3%E6%96%AF%E7%BA%AA%E5%BF%B5%E7%A2%91&form=hpcapt&mkt=zh-cn",
    "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20171207_SibeliusMonument%22&FORM=HPQUIZ",
    "wp": false,
    "hsh": "c9a7071a8f5438b9987213fc0696d972",
    "drk": 1,
    "top": 1,
    "bot": 1,
    "hs": []
  }],
  "tooltips": {
    "loading": "正在加载...",
    "previous": "上一个图像",
    "next": "下一个图像",
    "walle": "此图片不能下载用作壁纸。",
    "walls": "下载今日美图。仅限用作桌面壁纸。"
  }
}
数据处理
获取不同分辨率的壁纸,只需将ulr中对应的分辨率替换即可,支持的分辨率从如下:
['1920x1080', '1280x768', '1366x768', '1024x768', '800x600', '800x480', '720x1280', '640x480', '480x800', '400x240', '320x240', '240x320']

bing-wallpaper's People

Contributors

kuangpf avatar peakj avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.