def start_session(): api.authverif() likes_remaining = True num_likes = 0 num_dislikes = 0 while likes_remaining: # Retrieve recommended profiles from Tinder. for person in api.get_recommendations()['results']: person_id = person['_id'] rating = rater.get_rating(person) if hot_or_not(rating): if not _like(person_id): likes_remaining = False break num_likes += 1 else: _dislike(person_id) num_dislikes += 1 print(f"Swiping: {num_likes} likes, {num_dislikes} dislikes", end='\r') now = datetime.now() print( f"{now.strftime('%H:%M : %d/%m/%Y')} Session complete: {num_likes} likes, {num_dislikes} dislikes" )
def send_messages(fb_user_data, late_time): tinder_api.authverif(fb_user_data['fb_access'], fb_user_data['fb_user']) matches = tinder_api.get_updates()['matches'] for match in matches[:10]: tinder_api.send_msg( match, u"""Hey babe, just letting you know I’m the kind of person who turns up to things {} minutes late. Hope you’re okay with that 😉""".format(late_time / 60)) pause()
def matches(): if tinder.authverif() == True: matches = tinder.get_recommendations() return matches else: print('Sorry, something went wrong') return None
def recommend(): if not tinder_api.authverif(): login() recommendations = tinder_api.get_recommendations( ) # output json {status='', results=[profile]} # print(recommendations['results']) # get list of profiles # print(recommendations['results'][0]) return render_template('recommend.html')
global match_info now = datetime.utcnow() times = {} for person in match_info: name = match_info[person]['name'] ping_time = match_info[person]['last_activity_date'] since = get_last_activity_date(now, ping_time) times[name] = since print(name, "----->", since) return times def pause(): ''' In order to appear as a real Tinder user using the app... When making many API calls, it is important to pause a... realistic amount of time between actions to not make Tinder... suspicious! ''' nap_length = 3 * random() print('Napping for %f seconds...' % nap_length) sleep(nap_length) if __name__ == '__main__': if api.authverif() == True: print("Gathering Data on your matches...") match_info = get_match_info() else: print("Something went wrong. You were not authorized.")
clear = lambda: os.system('cls') fb_username = raw_input("Username/Email: ") fb_password = getpass.getpass(prompt='Password: '******'' try: while didIFindMyLove == False: person = tinder_api.get_person(count) distance_km = 0 if 'gender' in person: try: distance_mi = float(person['distance_mi']) except: distance_mi = 0 distance_km = float(distance_mi) * 1.609344 if int(person['gender']) == 1 and int(distance_km) < 100: detail = "ID: " + str(count) + " Img: " + str(
count = 0 while count < 50: women = matches() women = women['results'] for w in women: tinder.like(w['_id']) print('liked') count += 1 api.pause() nap_length = 3 * random.random() time.sleep(nap_length) tinder.authverif() m = api.get_match_info() for k in m.iteritems(): length = len(k) length -= 1 # definitions to pass on id = k[0] msgs = k[length]['messages'] name = k[length]['name'] print(k[length]) if len(msgs) == 0: sendMsg(name, id) api.pause()
###Helper code### class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' ###Setting up Tinder### authverif() ###Setting up IBMQX### device = 'ibmqx2' # the device to run on device = 'local_qasm_simulator' # uncomment to run on the simulator batch_size = 50 # Number of decisions in one request QPS_SPECS = { "name": "decision", "circuits": [{ "name": "decision_circuit", "quantum_registers": [{ "name": "q", "size": 1 }],