We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 936b39b commit 3e43e3dCopy full SHA for 3e43e3d
biyingSpider.py
@@ -5,10 +5,11 @@
5
url = 'http://cn.bing.com/'
6
con = requests.get(url)
7
content = con.text
8
-reg = r"(http://s.cn.bing.net/az/hprichbg/rb/.*?.jpg)"
+reg = r"(az/hprichbg/rb/.*?.jpg)"
9
a = re.findall(reg, content, re.S)[0]
10
print(a)
11
-read = requests.get(a)
+picUrl = url + a
12
+read = requests.get(picUrl)
13
f = open('%s.jpg' % local, 'wb')
14
f.write(read.content)
15
f.close()
0 commit comments