Comments (12)
Hi!
Yes, of course, you need just:
result = ImageToTextTask.ImageToTextTask(anticaptcha_key=ANTICAPTCHA_KEY) .captcha_handler(captcha_link='some_link', verify = False)
P.s. I think we need to add more examples ..
from python3-anticaptcha.
Hello,
So, When I tried put parameter 'verify = False' in captcha_handler, I received this error:
IdGetError:
Пораждается при ошибке получения ID капчи от сервиса. Ответ сервера:
{'errorId': 3, 'errorCode': 'ERROR_ZERO_CAPTCHA_FILESIZE', 'errorDescription': 'The size of the captcha you are uploading is less than 100 bytes'}
Code bellow:
image_link = "https://sipa.inss.gov.br/SipaINSS/api/imagem?d=I_60fa7b73-a494-4081-a1ce-f9e797387130_DB4A0BA13A6B26C1A0087B4BDE7288C0.lbroute_v131p040_internet"
# Возвращается строка-расшифровка капчи. Get string for solve captcha, and some other info.
user_answer = ImageToTextTask.ImageToTextTask(anticaptcha_key = ANTICAPTCHA_KEY).captcha_handler(captcha_link=image_link, verify = False)
print(user_answer)
from python3-anticaptcha.
Can you give a link to a page with a captcha?
from python3-anticaptcha.
Yes, link bellow:
https://sipa.inss.gov.br/SipaINSS/pages/consit/consitInicio.xhtml
from python3-anticaptcha.
Bad news :)
Okay, library can't download image, try add to captcha_handler
some cookies/header/other requests
params.
from python3-anticaptcha.
Okay, I'll try add others params in request.
from python3-anticaptcha.
Hey,
I believe I tried every possible way to add more params in captcha_handler but the library continues giving me same error :/
My code test:
image_link = "https://sipa.inss.gov.br/SipaINSS/api/imagem?d=I_946b3fa6-9796-4509-a8fe-c63a68835b9b_6FBFD2CF5556C06EFBF485588F77ABC6.lbroute_v131p040_internet&uId=1527080962508"
img_link="https://sipa.inss.gov.br/SipaINSS/pages/consit/consitInicio.xhtml"
headers = {
'Host': 'sipa.inss.gov.br',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0',
'Accept': 'image/webp,image/apng,image/*,*/*;q=0.8',
'Accept-Language': 'pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://sipa.inss.gov.br/SipaINSS/pages/consit/consitInicio.xhtml',
'Cookie': 'JSESSIONID="YjJ3eUWnCf24mZOembsjjMMT.slave1:server-sipa"',
'Connection': 'keep-alive'
}
proxies = {
"http": 'http://191.34.80.133:8080',
"https": 'http://191.34.80.133:8080'
}
payload = "d=I_20091a23-70f8-4c99-a744-a48484588fd4_696D39F6650C5D348D72FD5693E9D3F1.lbroute_v131p041_internet&uId=1527080676318"
user_answer = ImageToTextTask.ImageToTextTask(anticaptcha_key = ANTICAPTCHA_KEY).captcha_handler(captcha_link=img_link, verify=False, proxies=proxies, data=payload, headers=headers)
print(user_answer)
OBs.: I think that format of image is jfif, one thing interesting is when add _save_format = 'const _ in ImageToTextTask show me other error:
Could it be something related to the image format?
IdGetError:
Пораждается при ошибке получения ID капчи от сервиса. Ответ сервера:
{'errorId': 15, 'errorCode': 'ERROR_IMAGE_TYPE_NOT_SUPPORTED', 'errorDescription': 'Image you are uploading is not supported by our API. It must be JPEG, PNG or GIF.'}
from python3-anticaptcha.
Could it be something related to the image format?
Yes, library use .png format for images.
Try to download captcha-image with own script and than encode image with base64, and put it in python3-anticaptcha library(set param .captcha_handler(captcha_base64=%YOUR_base64_STRING%)
).
You can encode image with base64 library and code like this:
base64.b64encode(%IMAGE_HERE%).decode('utf-8')
from python3-anticaptcha.
I tried send the image in format base64 but return this error:
ParamError:
Пораждается, при передаче неверного параметра.Wrong 'save_format' parameter. Valid formats: 'const' or 'temp'.Неправильный 'save_format' параметр. Возможные форматы: 'const' или 'temp'.
So I get your exemplo of base64 e tried run but return same error, Can you check this?
OBs: I install your libray by pip, it looks like the outdated library
from python3-anticaptcha.
- Clone it from git and install(later i will update library on PyPi);
- U send wrong param, your request mustlook like:
from python3-anticaptcha.
Now it's working, thanks for the help :)
from python3-anticaptcha.
No problem 😊
from python3-anticaptcha.
Related Issues (20)
- поправьте HOT 2
- действительно тот Type? HOT 2
- отсутствует параметр в методе captcha_handler HOT 1
- Custom Captcha HOT 2
- Plan
- Enable to submit Google Recaptcha HOT 3
- Добавить вывод task_id в captcha_response
- Wrong errors.py file packed in dist/python3-anticaptcha-1.2.1.tar.gz HOT 1
- NoCaptchaTaskProxyless - ResourceWarning HOT 2
- How to use with Selenium and Chrome HOT 1
- Проблемы при скачивании картинки средствами библиотеки в асинхронном режиме
- Initial Update
- Token - Form submission returning "captcha wrong" HOT 24
- site key is always wrong HOT 2
- Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="recaptcha-demo-submit"]"} HOT 3
- Solving Captcha with auto submit HOT 5
- Don't use tight requirements HOT 4
- selenium_recaptcha_v2.py works on google.com demo but not on actual site HOT 2
- no captcha working
- Can You do Python library for Captchaai? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python3-anticaptcha.