Skip to content

Commit

Permalink
Fix spider bug
Browse files Browse the repository at this point in the history
  • Loading branch information
iflycn committed Jan 5, 2024
1 parent 9c9e9d6 commit 0a1b93f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spider/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
if not articles:
failed_attempts += 1
if failed_attempts > 3:
print("\n已连续失败 3 次,结束爬取")
break
print("\n已连续失败 3 次,程序中止")
os._exit(0)
print("\n爬取数据失败,暂停 5 分钟后重试")
time.sleep(300)
continue
Expand Down

0 comments on commit 0a1b93f

Please sign in to comment.