obnoxiousish / async_twitter_api_client

Async port of twitter-api-client
GNU General Public License v3.0
9 stars 2 forks source link

account.unlockViaArkoseCaptcha() #2

Closed codilau closed 4 months ago

codilau commented 4 months ago

Hi, thanks for this great tool. It looks very promising. I was interested in the account.unlockViaArkoseCaptcha() function but can't make it work and I;m not sure where I'm screwing it up. Would you mind sharing a usage example? I've got a API key for twocaptcha

obnoxiousish commented 4 months ago

are you calling asyncAuthenticate first? this function does not require any arguments

On Sun, Apr 28, 2024 at 11:47, codilau @.***(mailto:On Sun, Apr 28, 2024 at 11:47, codilau < wrote:

Hi, thanks for this great tool. It looks very promising. I was interested in the account.unlockViaArkoseCaptcha() function but can't make it work and I;m not sure where I'm screwing it up. Would you mind sharing a usage example? I've got a API key for twocaptcha

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

obnoxiousish commented 4 months ago

also make sure you add debug=True to the init

obnoxiousish commented 4 months ago

as well the twocaptcha key is provided at init and not when the function is called

obnoxiousish commented 4 months ago

today i will add some documentation to init and unlock and authenticate and give real var names and type hints instead of args kwargs

codilau commented 4 months ago

I'm instantianting as in your example passing the twocaptchaapikey as kwarg then I'm calling asyncAuthenticate, passing cookies as kwargs. Then I tried a few things around await twitter.unlockvia... with no arguments

obnoxiousish commented 4 months ago

the example provided in testAsyncTwitter.py is what works for me on many accounts, so if its not working for you i have no idea why sir i apologize, note that sometimes twocaptcha provides invalid captchas or provides no captcha at all and can take 3+ tries for a single unlock

if you wish to debug yourself use vscode python extension and clone the repo into the same dir youre workign in and add breakpoints on the responses and manually check them yourself. pushing an update shortly with some docs + type hints for ides

obnoxiousish commented 4 months ago

Another issue might be that it submits lang: en, if account isnt english maybe a problem

obnoxiousish commented 4 months ago

I just pushed an update that upgrades a lot, try now

obnoxiousish commented 4 months ago

Also realized was a problem with the debug logger i fixed

obnoxiousish commented 4 months ago

Fixed another issue with the unlocker, wasnt working in last update should work now

obnoxiousish commented 4 months ago

asyncAccount py_-_async-twitter-api-client_-_Visua_2024_04_28_14_32_14

Going to consider the issue closed perhaps unless more information is provided, refer to testAsyncTwitter.py

obnoxiousish commented 4 months ago

hmm seems there is still something wrong with the headers after a bunch of updates, gonna look into it more when i can

obnoxiousish commented 4 months ago

I think i finally found the issue, i think it was related to it accidentally sending the wrong cookies due to it having a cookie header from copying the headers and having cookies from copying cookies, also decided to add more headers that chrome was sending with the request.

I think it should properly support accoutns with other languages now as well, cleared a lock on a pt and a en account.

Please let me know if there is still an issue, will close in a few days if no reply

There is a ui_metrics that gets sent in the POST body, currently its static as I have no idea how to generate it, would be much appreciated if someone figures that out

obnoxiousish commented 4 months ago

More updates added, it's very reliable now I find

codilau commented 4 months ago

Brilliant mate! Awesome work and thanks a lot for the effort. It now works as expected. I'll keep using and exposing other bugs I might find!

obnoxiousish commented 4 months ago

There are quite a few things needed to be done, there are various discrepancies in asyncAccount & scraper & search because Trevor decided to have them use a different login() for each file, unifiying these functions into one location and unifiying the logger functions would be something important to do

Also missing tons of documentation, has awful variable names in some places as well.

Theres also some other stuff in the TODO in README.md, considering forking and contributing<3 Also consider sponsoring project or trying to advertise it in anyway as I'd love for people to know this exists