Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1ebac63

Browse files
Update leetcode_crawler.py
1 parent 26af8ed commit 1ebac63

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎spider/leetcode_crawler.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def get_problems_describe(self, filters=None):
142142
print('sqlite ',IS_SUCCESS)
143143
while not IS_SUCCESS and req_retry<3:
144144
# try:
145-
# 休眠随机 1 - 2 秒,以免爬去频率过高被服务器禁掉
145+
# 爬虫休眠随机 1 - 2 秒,爬取频率过高会被服务器检测到访问频率过快而禁掉ip的问题
146146
time.sleep(random.randint(1, 5))
147147
req_retry+=1
148148
cursor = conn.cursor()
@@ -577,7 +577,6 @@ def generate_questions_submission(self, path, filters):
577577
print('Specified tag is: {}'.format(args.tags))
578578

579579
leetcr.connect_mysql()
580-
581580
# leetcr.get_problems_describe()
582581
# leetcr.get_ac_questions_submission_json(filters,skipsubm=True)
583582
if args_dict.get('code'):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /