url updated
old one not work
This commit is contained in:
@@ -5,10 +5,11 @@ local = time.strftime("%Y.%m.%d")
|
||||
url = 'http://cn.bing.com/'
|
||||
con = requests.get(url)
|
||||
content = con.text
|
||||
reg = r"(http://s.cn.bing.net/az/hprichbg/rb/.*?.jpg)"
|
||||
reg = r"(az/hprichbg/rb/.*?.jpg)"
|
||||
a = re.findall(reg, content, re.S)[0]
|
||||
print(a)
|
||||
read = requests.get(a)
|
||||
picUrl = url + a
|
||||
read = requests.get(picUrl)
|
||||
f = open('%s.jpg' % local, 'wb')
|
||||
f.write(read.content)
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user