






















在百度搜东西,经常出来一大坨广告;要么就是复制粘贴文章。完全没有创新,搜索越来越困难。偶尔用一下bing还挺好用。
bing的壁纸是真心好看,每天不重样。决定写个脚本同步一下它的壁纸。

import requests import json import os
url = "https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=10&nc=1586230018677&pid=hp&uhd=1&uhdwidth=1920&uhdheight=1080" html = requests.get(url=url).text res = json.loads(html) def save_file(name,uri): res = requests.get(uri) file=os.path.join(r'D:\script\bing\pic',str(name)+'.jpg') if os.path.exists(file): os.remove(file) with open (file,'wb') as f: f.write(res.content) for i,j in enumerate(res.get('images')): save_file(i,'https://cn.bing.com/'+j.get('url'))



此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。