2017-12-15 24 views
-1
나는 그것이 내가 reCAPTCHA를 manually.Here를 해결하기로 결정 recaptcha.So을 무시하기 어렵다 work.Yet 일부 자동화 할 파이썬 셀레늄을 사용하고

는 윤곽이다 recaptcha를 수동으로 해결했습니다. 그래서, 까다로운 요점은 어떻게 recaptcha가 해결되었는지를 말해주는 것입니다. 어떤 아이디어라도 감사하겠습니다 !!!recaptcha가 해결되었는지 확인하는 방법은 무엇입니까?</p> <pre><code>#run script #pause #solve recaptcha myself #continue script </code></pre> <p>내 스크립트가 I 후 순간을 계속 실행하려면 :

+1

많은 당신'#solve의 reCAPTCHA를가 – DebanjanB

답변

0

그래서 우리에게 목록을 주었고 우리가 당신을 위해 그것을 만들 것을 기대 했습니까?

그건 어떻게 작동하지 않습니다. 그 말은 ... 나는 Captcha에 관심이있다.

import requests 
from time import sleep 

# Add these values 
API_KEY = '' # Your 2captcha API KEY 
site_key = '' # site-key, read the 2captcha docs on how to get this 
url = 'http://somewebsite.com' # example url 
proxy = '127.0.0.1:6969' # example proxy 

proxy = {'http': 'http://' + proxy, 'https': 'https://' + proxy} 

s = requests.Session() 

# here we post site key to 2captcha to get captcha ID (and we parse it here too) 
captcha_id = s.post("http://2captcha.com/in.php?key={}&method=userrecaptcha&googlekey={}&pageurl={}".format(API_KEY, site_key, url), proxies=proxy).text.split('|')[1] 
# then we parse gresponse from 2captcha response 
recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id), proxies=proxy).text 
print("solving ref captcha...") 
while 'CAPCHA_NOT_READY' in recaptcha_answer: 
    sleep(5) 
    recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id), proxies=proxy).text 
recaptcha_answer = recaptcha_answer.split('|')[1] 

# we make the payload for the post data here, use something like mitmproxy or fiddler to see what is needed 
payload = { 
    'key': 'value', 
    'gresponse': recaptcha_answer # This is the response from 2captcha, which is needed for the post request to go through. 
    } 


# then send the post request to the url 
response = s.post(url, payload, proxies=proxy) 
+0

감사를 myself' 방법에 따라 달라집니다이,이 녀석은 자동으로 보안 문자를 해결하는 것이 좋습니다 수 있습니다 : 보안 문자를 해결하는 측면에서, 나는 2captcha하는 것이 좋습니다. –

+0

@bowen 걱정할 필요가 없습니다. 나는 진짜로 captcha에 많이 가지 않았다. 결국 그것을 보려고 계획하지만 2captcha는 당신이 얻을 수있는 최상의 것입니다. 설명서가 훌륭합니다. Deathbycaptcha는 또 다른 문제이지만 문서가 심각하게 부족합니다 :) –

+0

안녕하세요, 귀찮게해서 죄송합니다. 이상한 문제를 만났습니다 .2captcha를 등록하려고했지만 '두 단어 입력'섹션을 계속 통과하지 못했습니다. 내가 봤던 두 단어를 타이프하고, 또한 그들 사이에 공간을 두었습니다. 이것을 해결할 올바른 방법을 알고 있습니까? 고마워요. [링크] (https://2captcha.com/auth/register) –