harryhare / 1point3acres

一亩三分地论坛 自动签到、答题
GNU General Public License v3.0
98 stars 60 forks source link

2captcha超时 #44

Open unemployed-denizen opened 1 year ago

unemployed-denizen commented 1 year ago

调用以下代码的时候会卡住,一直超时: raw_requests.py", line 290, result = solver.turnstile(sitekey=cf_capcha_site_key, url=checkin_page, useragent=user_agent)

2captcha网站显示ERROR_CAPTCHA_UNSOLVABLE image

最近才出现这种情况,以前没有。请问怎么解决呢?谢谢

完整报错

Traceback (most recent call last):
  File "D:/PycharmProjects/1point3acres/src/service.py", line 111, in <module>
    main()
  File "D:/PycharmProjects/1point3acres/src/service.py", line 97, in main
    do_all_cookie(solver, user["cookie"])
  File "D:/PycharmProjects/1point3acres/src/service.py", line 70, in do_all_cookie
    do_daily_checkin2_(solver)
  File "D:\PycharmProjects\1point3acres\src\raw_requests.py", line 290, in do_daily_checkin2_
    result = solver.turnstile(sitekey=cf_capcha_site_key, url=checkin_page, useragent=user_agent)
  File "xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\twocaptcha\solver.py", line 446, in turnstile
    **kwargs)
  File "xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\twocaptcha\solver.py", line 500, in solve
    code = self.wait_result(id_, timeout, sleep)
  File "xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\twocaptcha\solver.py", line 518, in wait_result
    raise TimeoutException(f'timeout {timeout} exceeded')
twocaptcha.solver.TimeoutException: timeout 120.0 exceeded
harryhare commented 1 year ago

好像因为验证码的形式改了,我看下怎么解

lu9999 commented 1 year ago

我也遇到同样的问题

Traceback (most recent call last):
  File "service.py", line 111, in <module>
    main()
  File "service.py", line 97, in main
    do_all_cookie(solver, user["cookie"])
  File "service.py", line 70, in do_all_cookie
    do_daily_checkin2_(solver)
  File "/volume3/homes/xxx/1point3acres/src/raw_requests.py", line 282, in do_daily_checkin2_
    result = solver.turnstile(sitekey=cf_capcha_site_key, url=checkin_page, useragent=user_agent)
  File "/var/services/homes/xxx/.local/lib/python3.8/site-packages/twocaptcha/solver.py", line 443, in turnstile
    result = self.solve(sitekey=sitekey,
  File "/var/services/homes/xxx/.local/lib/python3.8/site-packages/twocaptcha/solver.py", line 500, in solve
    code = self.wait_result(id_, timeout, sleep)
  File "/var/services/homes/xxx/.local/lib/python3.8/site-packages/twocaptcha/solver.py", line 518, in wait_result
    raise TimeoutException(f'timeout {timeout} exceeded')
twocaptcha.solver.TimeoutException: timeout 120.0 exceeded
bingyu50 commented 1 year ago

有解决方案了么?

harryhare commented 1 year ago

完蛋,没法复现。如果是timeout 的话,感觉可以加个重试逻辑,以后加