fxqwallpaper
Advanced tools
Comparing version 1.0.1 to 1.0.2
26
index.js
@@ -6,18 +6,12 @@ #!/usr/bin/env node | ||
const base='http://cn.bing.com'; | ||
function bing(fn){ | ||
request.get(url,(err,res,body)=>{ | ||
let data=JSON.parse(body).images[0]; | ||
let url=data.url; | ||
let w=fs.createWriteStream(data.hsh+'.png'); | ||
request.get(base+url).pipe(w); | ||
w.on('finish',()=>{ | ||
wallpaper.set(data.hsh+'.png').then(()=>{ | ||
console.log('finish'); | ||
}) | ||
request.get(url,(err,res,body)=>{ | ||
let data=JSON.parse(body).images[0]; | ||
let url=data.url; | ||
let w=fs.createWriteStream(data.hsh+'.png'); | ||
request.get(base+url).pipe(w); | ||
w.on('finish',()=>{ | ||
wallpaper.set(data.hsh+'.png').then(()=>{ | ||
console.log('finish'); | ||
}) | ||
}); | ||
} | ||
bing((err,r)=>{ | ||
console.log(r) | ||
}); | ||
module.exports=bing; | ||
}) | ||
}); |
{ | ||
"name": "fxqwallpaper", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "每日壁纸", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
874
15