Skip to content

Commit

Permalink
url updated
Browse files Browse the repository at this point in the history
old one not work
  • Loading branch information
Shun2014 authored Feb 13, 2018
1 parent 936b39b commit 3e43e3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions biyingSpider.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
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()

0 comments on commit 3e43e3d

Please sign in to comment.