JuiceFV / tinder_bot

The bot for the Tinder, based on CNN in purpose to swipe your date instead of you. ❤️
MIT License
7 stars 2 forks source link

Access token is broken #2

Open fsnaix opened 3 years ago

fsnaix commented 3 years ago

after changing my password for the n-th times the code can't retrieve the access token

JuiceFV commented 3 years ago

Yep, I was encountering this issue. Try to login in the tinder manually via yours new fb data.

fsnaix commented 3 years ago

how ?

JuiceFV commented 3 years ago

Follow to the Tinder, click log in button, and log in via facebook

fsnaix commented 3 years ago

Yeah and get the tinder auth id? pasted it back to the config file or the main code ?

JuiceFV commented 3 years ago

Nope, the problem is sneaking in the facebook. When you auths a bunch of time facebook switches the X-Auth for the tinder. Has your manual auth been successful?

fsnaix commented 3 years ago

Hmm, can you give it a more detailed explanation?

fsnaix commented 3 years ago

Untitled I got this after trying to reconfigure it agian

JuiceFV commented 3 years ago

Try to emquote ("") your fb email and password, for example:

session:
    facebook_id: <your-fb-id>
    facebook_email: "<your-email>@gmail.com"
    facebook_password: "<your-pass>"
JuiceFV commented 3 years ago

In the picture above I note the braces (< >), are they parts of your login data? if not, cut them off. Probably PyYaml handles them as "special" case, what turn the data into None.

fsnaix commented 3 years ago

I still get the access token could not be retrieved. Check your username and password. Official error: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

JuiceFV commented 3 years ago
  1. Try to login manually. I.e. Follow tinder.com, click login via facebook, paste your email and password data.
  2. If you got access to your tinder account - seems weird . Let me know.
  3. In case you failed - try to commit required steps (which facebook recommends) to reclaim the access.

Note: use the exact same login and pass as in your yaml file. Ex:

session:
    facebook_id: <your-fb-id>
    facebook_email: "asdasfdsdsfd@gmail.com"
    facebook_password: "<fs-0-=clnafj>"

Then your pass email and pass are:

fsnaix commented 3 years ago

I log in manually is fine but when the script did it failed

JuiceFV commented 3 years ago

Seems weird, I had no such problem, when I did the manual access also been failed. Try to debug it, cuz I've tested it with my own data it works well. Figure out the point where the auth fails

fsnaix commented 3 years ago

Traceback (most recent call last): File "application/validation_entry.py", line 15, in validator = Validator(config=upload_config(args.config)) File "C:\Users\GS65\tinder_bot\application\sources\validator\validator.py", line 15, in init self._session = Session(config=config['session']) File "C:\Users\GS65\tinder_bot\application\sources\pytinder\session.py", line 28, in init self._api.auth(self._config['facebook_email'], self._config['facebook_password']) File "C:\Users\GS65\tinder_bot\application\sources\pytinder\tinder_api.py", line 77, in auth raise errors.InitializationError("Authorization has been wrong. Couldn't retrieve a tinder's token.\n" application.sources.pytinder.exceptions.InitializationError: Authorization has been wrong. Couldn't retrieve a tinder's token. Check if your facebook's email and password are precise.

fsnaix commented 3 years ago

Here the traceback

fsnaix commented 3 years ago

YES IT FUCKING WORK THANKS THO

fsnaix commented 3 years ago

Yeah a new issue arived (env) C:\Users\GS65\tinder_bot>python application/entry.py -c config.yaml 2021-04-25 18:02:32.298747: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2021-04-25 18:02:32.298948: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "application/entry.py", line 184, in session = pytinder.Session(config=cfg['session']) File "C:\Users\GS65\tinder_bot\application\sources\pytinder\session.py", line 28, in init self._api.auth(self._config['facebook_email'], self._config['facebook_password']) File "C:\Users\GS65\tinder_bot\application\sources\pytinder\tinder_api.py", line 75, in auth self._x_auth_token = self._get_xauth_token(get_facebook_access_token(facebook_email, facebook_password)) File "C:\Users\GS65\tinder_bot\application\sources\pytinder\utilits.py", line 27, in get_facebook_access_token browser.submit_form(form) File "C:\Users\GS65\tinder_bot\env\lib\site-packages\robobrowser\browser.py", line 339, in submit_form payload = form.serialize(submit=submit) File "C:\Users\GS65\tinder_bot\env\lib\site-packages\robobrowser\forms\form.py", line 226, in serialize include_fields = prepare_fields(self.fields, self.submit_fields, submit) File "C:\Users\GS65\tinder_bot\env\lib\site-packages\robobrowser\forms\form.py", line 154, in prepare_fields raise exceptions.InvalidSubmitError() robobrowser.exceptions.InvalidSubmitError

fsnaix commented 3 years ago

Ok i got cockblock by facebook

JuiceFV commented 3 years ago

It's Facebook. I also had a ton of problems with it:) Thus only debugging is the clue

fsnaix commented 3 years ago

is there any way to bypass the checkpoint thing on Facebook?

fsnaix commented 3 years ago

image I fucking hate Facebook

fsnaix commented 3 years ago

I'm gonna try login with phone

fsnaix commented 3 years ago

If I succeed can I push it to the git?

JuiceFV commented 3 years ago

Yours git? Sure, you may use this code however u want

fsnaix commented 3 years ago

Traceback (most recent call last): File "application\validation_entry.py", line 15, in validator = Validator(config=upload_config(args.config)) File "C:\Users\GS65\tinder_bot\application\sources\validator\validator.py", line 15, in init self._session = Session(config=config['session']) File "C:\Users\GS65\tinder_bot\application\sources\pytinder\session.py", line 28, in init self._api.auth(self._config['facebook_email'], self._config['facebook_password']) File "C:\Users\GS65\tinder_bot\application\sources\pytinder\tinder_api.py", line 75, in auth self._x_auth_token = self._get_xauth_token(get_facebook_access_token(facebook_email, facebook_password)) File "C:\Users\GS65\tinder_bot\application\sources\pytinder\utilits.py", line 27, in get_facebook_access_token browser.submit_form(form) File "C:\Users\GS65\tinder_bot\env\lib\site-packages\robobrowser\browser.py", line 339, in submit_form payload = form.serialize(submit=submit) File "C:\Users\GS65\tinder_bot\env\lib\site-packages\robobrowser\forms\form.py", line 226, in serialize include_fields = prepare_fields(self.fields, self.submit_fields, submit) File "C:\Users\GS65\tinder_bot\env\lib\site-packages\robobrowser\forms\form.py", line 154, in prepare_fields raise exceptions.InvalidSubmitError() robobrowser.exceptions.InvalidSubmitError I'm getting this after git pull

fsnaix commented 3 years ago

robobrowser got fucked up?

JuiceFV commented 3 years ago

Pbly, I have to check it. Try to debug, it's not been updated since 2017, so feasibly the code is the issue. I've updated the bot few days ago, but not fully checked, may be I admitted a mistake.

fsnaix commented 3 years ago

I think maybe the pytinder lib have not updated in a while is really hard to implement a phone login function

JuiceFV commented 3 years ago

Yep, I mean I had a lot of issues with phone auth. Here the guy made an attempt to use the sms for the auth, but I got a lot of troubles. I've lunch the script in:

  1. Docker
  2. My own systems (Win10/Mac OS) it works fine with facebook.

I'm currently updating the base CNN (100% CPU is working on it). Once it's done, I'll try to check new functionality and upgrade this repo. You may pull it. In case you successfully complete phone auth, you may PR:)

fsnaix commented 3 years ago

I can spaghetti a working code but is not 100% of the time for some unknown reason

fsnaix commented 3 years ago

I found out what is the problem is the headers and the user agent (This is because facebook checkpoint)

JuiceFV commented 3 years ago

What exactly checkpoint? It stores the user-agent information somehow?

fsnaix commented 3 years ago

It's mostly related to Facebook logins. I copied my user agent from my phone, and everything works after a day or so; I got my self a new girlfriend

fsnaix commented 3 years ago

Excellent job on the AI. Here is my result :))))

https://user-images.githubusercontent.com/51787675/117512621-27b6c780-afba-11eb-8d10-afa539c5cefe.mp4

JuiceFV commented 3 years ago

Not quite excellent) I've admitted a bunch of mistakes, for example:

  1. AUC-metric, not quite good. I had 60% - likes and 40% - dislike, what means a kind of "self-sustainable" dataset. Where the accuracy is the best metric.
  2. I'm currently trying to use MadGrad to adjust it more precisely.
  3. I've not made hyperparameter tuning, I do now. And other stuff