Skip to content

Commit

Permalink
update cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
Germey committed Jul 12, 2017
1 parent 062d32d commit 86d6313
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion proxypool/getter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def is_over_threshold(self):
def run(self):
print('获取器开始执行')
proxy_count = 0
while not self.is_over_threshold():
if not self.is_over_threshold():
for callback_label in range(self.crawler.__CrawlFuncCount__):
callback = self.crawler.__CrawlFunc__[callback_label]
# 获取代理
Expand Down
2 changes: 1 addition & 1 deletion proxypool/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def schedule_getter(self, cycle=GETTER_CYCLE):
"""
定时获取代理
"""
getter = Getter()
while True:
print('开始抓取代理')
getter = Getter()
getter.run()
time.sleep(cycle)

Expand Down

0 comments on commit 86d6313

Please sign in to comment.