Closed VeNoMouS closed 3 years ago
Yes, do you need it now or it can wait until weekend?
if possible now, im trying to rewrite cloudscraper to support it , ive already moved the other providers.
In about 8 hours I will be able to take care of this at the earliest.
Does the code itself not support proxy , as i dont see how it would or am i reading it completely wrong.
We have support for hCaptcha proxy. It have to be something like:
def parse_url(url):
parsed = urlparse(url)
return dict(
proxy_type=parsed.scheme,
proxy_address=parsed.hostname,
proxy_port=parsed.port,
proxy_login=parsed.username,
proxy_password=parsed.password,
)
proxy = parse_url(proxy_url)
task = HCaptchaTask(website_url=url, website_key=site_key, proxy=proxy)
job = client.createTask(task)
job.join()
return job.get_solution_response()
I can not test that snippet of code right now.
yea i wrote something like that, except ...
File "/usr/local/lib/python3.7/dist-packages/python_anticaptcha/tasks.py", line 12, in __init__
self.proxyType = kwargs.pop("proxy_type")
KeyError: 'proxy_type'
I added example for HCaptcha: https://github.com/ad-m/python-anticaptcha/blob/master/examples/hcaptcha_request_proxy.py I included that example in e2e tests: https://github.com/ad-m/python-anticaptcha/blob/master/tests/test_examples.py#L134-L141
@VeNoMouS, can I help you somehow?
nah mate sorry its all good, its sorted
@ad-m can you please supply a working example of how to pass proxy for hCaptcha?