Update image_recognition_zhihu.py

pull/90/head
DoubleXixi 2023-01-05 16:59:22 +08:00 committed by GitHub
parent 94faec41b8
commit e51ba49114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ def bolting(k_low,k_hi,k3_confidence):
"input_text":input_text "input_text":input_text
} }
# 提交过快会被拒绝,{"code":120005,"name":"ERR_VERIFY_CAPTCHA_TOO_QUICK"} 假装思考5秒钟 # 提交过快会被拒绝,{"code":120005,"name":"ERR_VERIFY_CAPTCHA_TOO_QUICK"} 防止ip短时间大量访问同一链接
time.sleep( 4 + random.randint(1,9)/10 ) time.sleep( 4 + random.randint(1,9)/10 )
try: try:
resp5 = sessiona.post('https://www.zhihu.com/api/v3/oauth/captcha?lang=cn',data,headers=headers) resp5 = sessiona.post('https://www.zhihu.com/api/v3/oauth/captcha?lang=cn',data,headers=headers)