Skip to content

Instantly share code, notes, and snippets.

@mcomisso
Created November 18, 2014 09:20
Show Gist options
  • Save mcomisso/fdb565a2b65c9ea03c9a to your computer and use it in GitHub Desktop.
Save mcomisso/fdb565a2b65c9ea03c9a to your computer and use it in GitHub Desktop.
Tinder Auto like
import requests, json
#Commont utils url and authToken
authToken = ""
baseLikeUrl = "https://api.gotinder.com/like/"
baseProfileUrl = "https://api.gotinder.com/user/"
myFeed = "https://api.gotinder.com/user/recs"
s = requests.Session()
s.headers.update({'X-Auth-Token':authToken})
s.headers.update({'User-Agent': 'Tinder/4.0.9 (iPhone; iOS 8.1.1; Scale/2.00)'})
s.headers.update({'platform': 'ios'})
s.headers.update({'Authorization': 'Token token="'+ authToken +'"'})
myTinderFeed = s.get(myFeed)
#canBePrinted = r''.join(r.text).encode('utf-8')
#print canBePrinted
#Load the json response
json_feed = json.loads(myTinderFeed.text)
if json_feed.get('message'):
print json_feed['message']
pass
else:
looper = len(json_feed['results'])
for x in xrange(0,looper):
newPersonName = u''.join(json_feed['results'][x]['name']).encode('utf-8')
_id = json_feed['results'][x]['_id']
#profilePic = json_feed['results'][x]['photos'][0]
print newPersonName + " id: " + _id
personToLike = baseLikeUrl + _id
responseForLike = s.get(personToLike)
jsonResponseForLike = json.loads(responseForLike.text)
print "match? " + str(jsonResponseForLike['match'])
if jsonResponseForLike['match']:
matchedId = jsonResponseForLike['match']['_id']
print "New match! id: " + matchedId
matchedPerson = s.get(baseProfileUrl + matchedId)
responsePerson = json.loads(matchedPerson.text)
name = u''.join(responsePerson["results"]["name"]).encode('utf-8')
#photo = responsePerson["results"]["photos"][0]
print name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment