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 c1dc3c3 commit d4c32e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DouBanSpider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import time
import urllib
import requests
import numpy as np
from bs4 import BeautifulSoup
from openpyxl import Workbook

Expand All @@ -22,7 +23,7 @@ def book_spider(book_tag):

while(1):
url="http://www.douban.com/tag/"+urllib.quote(book_tag)+"/book?start="+str(page_num*15)
time.sleep(0.3)
time.sleep(np.random.rand()*2)

#Last Version, 伪装成浏览器
try:
Expand Down

0 comments on commit d4c32e9

Please sign in to comment.