Giter Club home page Giter Club logo

python_tinderapi's Introduction

Tinder api -> Python-bindings

This project contains python bindings for the unoffical tinder api. The tinder api is constantly changing and current libraries are not always up to date. This project is a mix of Pynder's style and Fbessez's endpoints/auth. Current a work in progress but is suitable for non-production projects.

UPDATED AUTHENTICATION - (12/30/19)

Tinder switched away from account-kit. Please use the SMS auth file(updated 12/30) to get your tinder token. I suggest hard coding it into the config.py file after you have obtained it. If sms_auth is not working for you, you can find your tinder token using chrome inspector tool. Login to tinder.com, and search it the network tab for a request from the api. Check the request Headers for x-auth-token. Once you copy it, paste it into config.py. See photo.

Please note, as of this update, I only tested through the example, and it all seemed to work. :) I have built two other projects off this api, include an auto swiper (tensorflow) and a GUI (Very unfinished). Feel free to check them out if you would like, but clone this repo as it is the most up to date api.

Getting Started

You will need to insert your tinder_token in the utils/config.py file. This currently uses SMS auth method for verification as FaceBook auth has changed. Clone this repo, in your project import tinder_api and get to work. The example.py shows how to get rolling.

Usage

import tinder_api.session

sess = tinder_api.session.Session() # creates a session

print(sess.meta) # prints your meta data
sess.update_profile(bio="I love VIM") # updates your bio - see kwargs

for user in sess.yield_users():
    user.name
    user.id
    user.age
    user.bio
    user.gender # male or female
    user.photos # url of the photos
    user.like() # swipe right
    user.pass() # swipe left
    user.super_like() # swipe up

    user.report(1) # report for spam

for match in sess.yield_matches():
    match.name # all the same endpoints as a normal user
    match.match_data # contains match data like messages/profile
    match.message('Hello, I use VIM so I am superior to all those other programmers you've dated')
    match.get_messages()

Authors/Acknowledgments

  • ** Michael ** - Initial Work MMcintire96
  • ** Sharkbound ** - Json Wrapper sharkbound
  • ** Wowotek ** - Pull requests, cleanup and design wowotek

TODO

  1. Move more methods to JsonWrapper
  2. Optimize for speed -- UserController + NormalUser = 1.5s, MatchUser = 3.0s
  3. Maybe add Routes.py
  4. Fix FB Auth Method

python_tinderapi's People

Contributors

mmcintire96 avatar wowotek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

python_tinderapi's Issues

this doesnt work

after sms verification i got this response

{'meta': {'status': 200}, 'data': {'refresh_token': 'xx', 'onboarding_token': 'xx', 'is_new_user': True}}

then i put onboarding_token on utils/config.py

then i ran example.py, i got this error

[python_TinderAPI] $ python3 example.py 
Traceback (most recent call last):
  File "example.py", line 4, in <module>
    sess = tinder_api.session.Session() # inits the session
  File "/home/xxx/Programs/python_TinderAPI/tinder_api/session.py", line 10, in __init__
    self.auth = self.auth()
  File "/home/xxx/Programs/python_TinderAPI/tinder_api/session.py", line 19, in auth
    req = r.post('/auth/login/accountkit', {'token': c.tinder_token, 'id': c.tinder_token, 'client_version': '9.0.1'})
  File "/home/xxx/Programs/python_TinderAPI/tinder_api/utils/request_handlers.py", line 17, in post
    return r.json()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Updating age filter, with https://api.gotinder.com/v2/profile or https://api.gotinder.com/profile?

I try to update the age filter, and it works only with first version of Tinder API, this link, https://api.gotinder.com/profile, if i use version2, (https://api.gotinder.com/v2/profile), i get 200 status response, but the filter it's not change in the profile, so i'm wondering if using the first version of API is somehow prejudicial on the tinder profile used or not,

and if there is a way to make it works on V2.

thanks

This is the code i send
{
"age_filter_min": 23,
"age_filter_max": 23
}

KeyError: 'results'

Hi there, since a few days I am not able to get any users. Anyone having the same problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.