Open FuckingToasters opened 1 year ago
Can you show code where you using async-hcaptcha? I tried using async-hcaptcha for phone verification and it working: async-hcaptcha, browser (the responses are the same, which means that async-hcaptcha works).
Code I used in video:
from time import time
from async_hcaptcha import AioHcaptcha
async def main():
sitekey = input("SiteKey: ")
url = input("Url: ") # https://discord.com/channels/@me
st = time()
# If you installed aio-hcaptcha from github, use {"chromedriver": "chromedriver.exe"} instead of {"executable_path": "chromedriver.exe"}
solver = AioHcaptcha(sitekey, url, {"executable_path": "chromedriver.exe"})
resp = await solver.solve()
print(resp)
print(f"Solved in {round(time()-st, 2)}s")
if __name__ == "__main__":
from asyncio import get_event_loop
get_event_loop().run_until_complete(main())
Can you show code where you using async-hcaptcha? I tried using async-hcaptcha for phone verification and it working: async-hcaptcha, browser (the responses are the same, which means that async-hcaptcha works).
Code I used in video:
from time import time from async_hcaptcha import AioHcaptcha async def main(): sitekey = input("SiteKey: ") url = input("Url: ") # https://discord.com/channels/@me st = time() # If you installed aio-hcaptcha from github, use {"chromedriver": "chromedriver.exe"} instead of {"executable_path": "chromedriver.exe"} solver = AioHcaptcha(sitekey, url, {"executable_path": "chromedriver.exe"}) resp = await solver.solve() print(resp) print(f"Solved in {round(time()-st, 2)}s") if __name__ == "__main__": from asyncio import get_event_loop get_event_loop().run_until_complete(main())
I almost used the same (except the print statement & the get_event_loop()) I was simply using asyncio.run(function())
After getting the captcha token and passing it to discord the response was also 204: no content
which seem to be the case if it was sucessful however discord refuse to send any smscode when using this libary but send codes when using captcha solving services.
Anohter thing is, that using this libary with multiple threads cause these tracebacks:
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0DD060D0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x12774688>, 13055.171)]']
connector: <aiohttp.connector.TCPConnector object at 0x0DD06730>
Sometimes instead of a captcha token, the content is None. Does that mean that no captcha were found?
It means that automatic solver can't solve specific question (e.g. toy turtle). You can increase count of retries:
await solver.solve(retry_count=5) # Default is 1
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0DD060D0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x12774688>, 13055.171)]']
connector: <aiohttp.connector.TCPConnector object at 0x0DD06730>
Try to use run_until_complete instead of run:
asyncio.get_event_loop().run_until_complete(...)
# Or
asyncio.new_event_loop().run_until_complete(...)
Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x0DD060D0> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x12774688>, 13055.171)]'] connector: <aiohttp.connector.TCPConnector object at 0x0DD06730>
Try to use run_until_complete instead of run:
asyncio.new_event_loop().run_until_complete(...)
This cause more issues (httpx.readtimeput: the operation timed out
& same erro from above multiple times)
update after printing the responses:
discord response now somehow always is 405: method not allowed
what should i do to solve this?
Check your request method. You should use POST method for all phone verification endpoints.
Check your request method. You should use POST method for all phone verification endpoints.
ye i solved the issues for now i guess however there seem to be something wrong with the captcha solution i'm getting.
when using paid services like anticaptcha it works fine but when using capmonster or this project, discord never send the verify sms.
It is indeed weird, when i use captcha solvers like anticaptcha, 2captcha or capmonster everything works fine but when i use this one to solve captchas without paying any money it won't rly work. It give me a captchakey but when sending this one to discord and then continue with the next code discord won't send a smscode (i'm trying to implement it in the discord phone verifier on my github)