Table of Contents
You're making a bot farm ? or a Scrapper ?
You don't want to have to manage costs while debugging you're system ?
This script is THE solution for your problem !
A Small API running in Python Receives the Tickets and replies to them as if it was a consumer API, Such as 2Captcha
Consider Staring this project if you like it :)
This project uses Python and a few modules
Simple unzip, install modules and voila
- If you're interested in this project i assume that you already have bases in computer sience, Python is required to run the project , you can download it directly from https://www.python.org/
- Install the required dependancies with the command
pip install requirements.txtif you're really struggling just start the setup .bat mate - The script is ready to be run, you can possibly change the settings in the file
settings.cfgthere arent a lot of options so far only ip, port, and the background path
[API]
host = localhost
port = 4848
[general]
background = Themes/theme3.gif- You need to add the embedings in your scrapping script now, examples are available in the folder
Examplesyou can use something like this in Python:
import ImgCaptchaClient
Img_Captcha_Local = True
LocalSolver = ImgCaptchaClient.Solver("http://localhost:4848")
if Img_Captcha_Local:
Response = LocalSolver.solve_image("IMAGE PATH")
else:
## your normal script
print("Consumer API image Captcha Solver")IF YOU'RE NOT USING PYTHON THIS IS JUST A POST REQUEST TO : http://localhost:1825/api/submit with who you'll get a request id (req_id) that you'll need to ping http://localhost:1825/api/check/{req_id} you'll get your queue_position
here is the script of ImgCaptchaClient.py for you to understand properly :
import requests
import time
import sys
class SolverClient:
def __init__(self, server_url='http://localhost:4848'):
self.api_url = server_url
def solve_image(self, image_path):
try:
with open(image_path, 'rb') as f:
response = requests.post(
f"{self.api_url}/api/submit",
files={'image': f}
)
if not response.ok:
print(f"HTTP Error {response.status_code}")
return None
data = response.json()
req_id = data['request_id']
print(f"ID: {req_id}")
print(f"Position in queue: {data['queue_position']}")
while True:
response = requests.get(f"{self.api_url}/api/check/{req_id}")
data = response.json()
if data['status'] != 'PENDING':
return data['status']
print(f"\rWaiting... Position: {data['queue_position']}", end="")
time.sleep(1)
except Exception as e:
print(f"Error: {e}")
return None
finally:
print()
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: client.py <path_image>")
sys.exit(1)
client = SolverClient()
result = client.solve_image(sys.argv[1])
print(f"Result: {result}")- You're done :)
- Make it work
- Youtube Video
Elxss - discord: eliasss8886_ - elxssgitcontact@gmail.com - website: elxss.github.io
This is a Readme.md Template



