Skip to content

Commit

Permalink
Update DouBanSpider.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lanbing510 committed May 20, 2015
1 parent 134a07a commit f36c82e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DouBanSpider.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def book_spider(book_tag):
req = urllib2.Request(url, headers=hds[page_num%len(hds)])
source_code = urllib2.urlopen(req).read()
plain_text=str(source_code)
except urllib2.HTTPError, e:
except (urllib2.HTTPError, urllib2.URLError), e:
print e
continue

Expand Down

0 comments on commit f36c82e

Please sign in to comment.