From e51ba491140f0ac281f58787b9fa0b5d79ab74ed Mon Sep 17 00:00:00 2001 From: DoubleXixi <50405821+DoubleXixi@users.noreply.github.com> Date: Thu, 5 Jan 2023 16:59:22 +0800 Subject: [PATCH] Update image_recognition_zhihu.py --- image_recognition_zhihu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_recognition_zhihu.py b/image_recognition_zhihu.py index 5dd0a53b..452db291 100644 --- a/image_recognition_zhihu.py +++ b/image_recognition_zhihu.py @@ -132,7 +132,7 @@ def bolting(k_low,k_hi,k3_confidence): "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 ) try: resp5 = sessiona.post('https://www.zhihu.com/api/v3/oauth/captcha?lang=cn',data,headers=headers)