Skip to content

Commit

Permalink
Fix BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
HanZhuoii committed Nov 25, 2020
1 parent 6d6f755 commit da3cbd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def spider(topic_id: str):
sleep(.3)
url = redis.get(topic_id).decode("utf-8")
if int(findall("offset=(\d*)", url)[0]) % 10000 == 0:
sleep(60)
redis.rpush("list_"+config.TOPIC_ID_SET, topic_id)
return
try:
res = html_downloader.download(url)
except exceptions.RetryError:
Expand Down

0 comments on commit da3cbd1

Please sign in to comment.