andreidrang / python3-anticaptcha Goto Github PK
View Code? Open in Web Editor NEWPython library for AntiCaptcha.
Home Page: https://andreidrang.github.io/python3-anticaptcha/
License: MIT License
Python library for AntiCaptcha.
Home Page: https://andreidrang.github.io/python3-anticaptcha/
License: MIT License
Hi,
Can You do Python library for Captchaai? Docs can be found here https://captchaai.com/api-docs.php
CaptchAI is already available in many Software Captcha options like GSA SER. Also, They have a ready Referral Program. The ratio is from 10% to 20%.
So it is a win-win situation for all
Thanks
###Short description of trouble. Краткое описание проблемы.
Отсутствие параметра task_id в ответе от сервера.
Hello,
I'm trying to login to one site where i can check for my bills. It uses recaptcha unfortunately ... For test purposes, I copied the exact selenium_recaptcha_v2.py script and added my API_KEY, when got to part:
browser.page_source
and noticed that it was successful.
However when i tried on real live site (i will post the site if requested) it fails to do so, site thinks that i have never clicked on recaptcha form. Ofcourse i have verified and when necessary edited lines
to match the site source.
When i eventually try and execute everything, site just says that recaptcha was not submitted.
Any idea what else i need to look into to make this work?
I need get images by site with untrusted SSL certificate, in a common request I pass 'verify=False' in get of request.
There is some way get images by site with untrusted SSL certificate?
Hello and thanks for this wrapper. I've tried to post the request I get using Selenium, but the webpage is unaffected. Am I doing something wrong?
from seleniumrequests import Firefox
DRIVER = Firefox()
DRIVER.request('POST', PAGE_URL, data={'g-recaptcha-response': user_answer})
where page url, and user answer are correctly defined.
Printing response gives me 200, but when I check selenium, the captcha isn't solved.
When I execute several processes to resolve recaptchas, I am issued this warning and it continues to work.
/python3.6/site-packages/python3_anticaptcha/NoCaptchaTaskProxyless.py:98: ResourceWarning: unclosed <socket.socket fd=23, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('xxx.xxx.xxx.xxx', 52936), raddr=('209.212.146.169', 443)
result_payload=self.result_payload, sleep_time=self.sleep_time
Добавить методы:
###Short description of trouble. Краткое описание проблемы.
hello . i want use custom captcha so i got this doc https://python-anticaptcha.readthedocs.io/en/latest/fields.html
from python_anticaptcha import AnticaptchaClient, ImageToTextTask,CustomCaptchaTask
when i import i got
cannot import name 'CustomCaptchaTask' from 'python_anticaptcha'
any doc for custom captcha ? or is'nt yet supported ?
###Full description of trouble. Полное описание проблемы.
Hi! I am tried all the different captchas for the site below, and none of them works. Would you have some hint/s to help me?
PAGE_URL = "https://service2.diplo.de/rktermin/extern/appointment_showDay.do?locationCode=buen&realmId=410&categoryId=659&dateStr=29.12.2021"
The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.
Hello, first of all, thank you for your great work here!
Okay, so I'm creating a account sign up bot using python, and everything work just fine but when I submit the captcha, it return "Verification unsuccessful. Please try again."
I tried many way but still cannot figure it out why is this happening. Can you point me out where my mistake? Thank you so much.
Here is the callback script of the site for submitting captcha since it doesnt have the submit button.
function attachChoiceHandlers(markupId, callbackScript) { var inputNodes = wicketGet(markupId).getElementsByTagName('input'); for (var i = 0 ; i < inputNodes.length ; i ++) { var inputNode = inputNodes[i]; if (!inputNode.type) continue; if (!(inputNode.className.indexOf('wicket-'+markupId)>=0)&&!(inputNode.id.indexOf(markupId+'-')>=0)) continue; var inputType = inputNode.type.toLowerCase(); if (inputType == 'checkbox' || inputType == 'radio') { Wicket.Event.add(inputNode, 'click', callbackScript); } } }
This is the reCaptcha element:
<textarea id="g-recaptcha-response-1" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid rgb(193, 193, 193); margin: 10px 25px; padding: 0px; resize: none; display: none;"></textarea>My code for captcha handle:
site_key = self.driver.find_element_by_id("g-recaptcha-panel").get_attribute("data-sitekey")
cap_url = self.driver.find_elements_by_tag_name("iframe")[0].get_attribute("src")
client = AnticaptchaClient(self.ac_token)
task = NoCaptchaTaskProxylessTask(cap_url, site_key)
job = client.createTask(task)
print("Submitting Captcha")
job.join()
response = job.get_solution_response()
print("Submited Captcha", response)
wait(0.5)
self.driver.execute_script('document.getElementById("g-recaptcha-response").innerHTML = "%s"' % response)
wait(2)
self.driver.execute_script("x = document.getElementsByTagName('input')[0];"
"x.click();")
wait(3)
self.driver.find_element_by_class_name("InputSubmit").click()
я даже не могу описать уровень моего недовольства этим куском кода. Надеюсь вы понимаете, что это дно
Hey.
As you may know python's new package dependency resolver is going to change and be strict about conflicting package dependencies.
The current requirements are too strict and I don't think they are needed.
###Short description of trouble. Краткое описание проблемы.
Site key always wrong
###Full description of trouble. Полное описание проблемы.
the site key is always wrong when trying to get the captcha_key answer = ReCaptchaV3TaskProxyless.ReCaptchaV3TaskProxyless(anticaptcha_key=anticaptchakey)\ .captcha_handler( websiteURL="https://discordapp.com/register", websiteKey="6Lef5iQTAAAAAKeIvIY-DeexoO3gj7ryl9rLMEnn", minScore=0.3, pageAction="link_page", )
How do we go about solving a captcha that doesnt have a final submit button but rather checks by itself if captcha is solved and then finished sign up:
website I am reffering to: https://www.roblox.com/account/signupredir
Thanks
###Short description of trouble. Краткое описание проблемы
I want to login in to the site swagbucks.com.
###Full description of trouble. Полное описание проблемы.
I guess I need to Inject/send the result token in some way to make it work.
Any help how to use the result token with selenium/chrome?
###Short description of trouble. Краткое описание проблемы.
отсутствует параметр в методе
###Full description of trouble. Полное описание проблемы.
`Base64 files
Пример работы с передачей файла капчи уже закодированного в base64
An example of working with captcha file already encoded in base64
"""
base_64_file = open('base64image.txt', 'rb')
user_answer_base64 = ImageToTextTask.ImageToTextTask(anticaptcha_key=ANTICAPTCHA_KEY).captcha_handler(captcha_base64=base_64_file)
print(user_answer_base64)
`
captcha_base64 нет такого параметра у метода
Describe the bug
python3_anticaptcha/errors.py file in git and distribution archive are different.
To Reproduce
Steps to reproduce the behavior:
0. You're in your python3-anticaptcha repo dir
First, thank's for this library.
I'm using the following code to bypass a "Recaptcha":
ANTICAPTCHA_KEY = ''
PAGE_URL = url
SITE_KEY = site_key
result = NoCaptchaTaskProxyless.NoCaptchaTaskProxyless(anticaptcha_key = ANTICAPTCHA_KEY)\
.captcha_handler(websiteURL=PAGE_URL,
websiteKey=SITE_KEY)
captcha_answer = result.get("solution").get("gRecaptchaResponse")
if captcha_answer != "":
print(captcha_answer)
self.driver.execute_script("document.getElementById('g-recaptcha-response').focus()")
time.sleep(2)
self.driver.execute_script("document.getElementById('g-recaptcha-response').innerHTML='%s'" % captcha_answer)
time.sleep(2)
nextBtn = self.driver.find_element_by_xpath("//input[@value='Avançar']")
nextBtn.click()
Problem: After click the button to submit the form, the page returns an error concerning the "Captcha wrong".
Can someone help me ?
тут точно FunCaptchaTask, а не NoCaptchaTask?
Describe the bug
При вызове ImageToTextTask.aioImageToTextTask с параметрами save_format="const" и captcha_link="...." скачивается и отправляется неполная картинка.
To Reproduce
Steps to reproduce the behavior:
async def run():
try:
resolve = await ImageToTextTask.aioImageToTextTask(
anticaptcha_key=ANTICAPTCHA_KEY, save_format="const"
).captcha_handler(
captcha_link="http://www.list-org.com/kcap.php?PHPSESSID=ahaisngr4lh63to9itqn9n85m6"
)
print(resolve)
except Exception as err:
print(err)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
loop.close()
Expected behavior
Получить полную картинку.
Desktop (please complete the following information):
Не решает рекапчу 2-ую. Использую скрипт который есть в репозитории. Сайт - idealo.de
import time
from selenium import webdriver
from python3_anticaptcha.NoCaptchaTaskProxyless import NoCaptchaTaskProxyless
ANTICAPTCHA_KEY = "xxx"
WEB_URL = "https://www.idealo.de/"
SITE_KEY = "6LdAKg4TAAAAACsbrjT4aMumPbLZCz-6pslszlrQ"
post_xpath = '//*[@id="recaptcha-demo-submit"]'
recaptcha_xpath = '//*[@id="g-recaptcha-response"]'
# setup selenium
browser_options = webdriver.ChromeOptions()
# browser_options.headless = True
browser_options.add_argument("--disable-gpu")
browser_options.add_argument("--no-sandbox")
browser_options.add_argument("disable-infobars")
browser_options.add_argument("--disable-extensions")
# run browser
browser = webdriver.Chrome(executable_path="chromedriver.exe", options=browser_options)
# open page
browser.get(WEB_URL)
# prepare captcha solver
captcha_obj = NoCaptchaTaskProxyless(anticaptcha_key=ANTICAPTCHA_KEY)
# solve recaptcha
browser.execute_script("document.getElementById('g-recaptcha-response').style.display = 'block';")
# wait script finish
time.sleep(1)
recaptcha_element = browser.find_element_by_xpath(recaptcha_xpath)
recaptcha_element.click()
recaptcha_element.clear()
# get captcha solution
captcha_result = captcha_obj.captcha_handler(websiteURL=WEB_URL, websiteKey=SITE_KEY)
# insert captcha solution
recaptcha_element.send_keys(captcha_result["solution"]["gRecaptchaResponse"])
# wait success insertion
time.sleep(2)
# push post button
post_button = browser.find_element_by_xpath(post_xpath)
browser.execute_script("arguments[0].click();", post_button)
# OR
# post_button.click()
time.sleep(5)
browser.quit()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.