コード例 #1
0
 def chooseDislike(self):
     ti.dislike(self.id)
     if (self.df.iloc[self.profileNum]['liked'] == 1):
         self.df.at[self.profileNum, 'liked'] = 0
         os.remove(f"./data/images/liked/{self.id}.jpg")
     self.df.at[self.profileNum, 'dislike'] = 1
     shutil.copy(f"./data/images/unlabeled/{self.id}.jpg",
                 f"./data/images/disliked/{self.id}.jpg")
     self.nextID()
コード例 #2
0
 def dislike_person(self):
     if not self.logged_in:
         self.feedback_append_line("Please login first!")
         return
     self.feedback_append_line("Disliking: " + self.id)
     resp = tinder_api.dislike(self.id)
     print(resp)
コード例 #3
0
    prop_nopes = 100.0 - prop_likes
    print('likes = {} ({}%), nopes = {} ({}%)'.format(likes, prop_likes, nopes,
                                                      prop_nopes))


if __name__ == "__main__":
    like_ids, dislike_ids = [], []
    tinderlogin(config.username, config.password)
    ti.change_preferences(age_filter_min=AGE_MIN,
                          age_filter_max=AGE_MAX,
                          distance_filter=DISTANCE)
    rate_limited = 0
    while True:
        rec = ti.get_recs_v2()["data"]["results"]
        for user in rec:
            id_ = user["user"]["_id"]
            url = user["user"]['photos'][0]["processedFiles"][0]["url"]
            try:
                if like_or_nope(url) == 1:
                    ti.like(id_)
                    like_ids.append(id_)
                else:
                    ti.dislike(id_)
                    dislike_ids.append(id_)
            except:
                rate_limited = 1
        if rate_limited == 1:
            print('Limit reached.')
            break
    print(stats(len(like_ids), len(dislike_ids)))
コード例 #4
0
ファイル: app.py プロジェクト: ntsd/Tinder-Like-Prediction
def dislike(userId):
    tinder_api.dislike(userId)
コード例 #5
0
ファイル: start.py プロジェクト: dmitrysonder/Tinder
        api.get_ping(lat,lon)
        matches = get_match_info()
        for match in matches:
            try:
                match_id = matches[i]['match_id']
                offer_id = 1
                text = select_msg(match_id,offer_id)
                api.send_msg(match_id, text)
            except:
                continue
        rec = api.get_recommendations()
        i = 0
        for user in rec:
            try:
                if i%3=0:
                    api.dislike(user["person_id"])
                else:
                    api.like(user["person_id"])
                i ++
            except:
                continue
    except:
        break



# matchthread.join()

# Upon starting the program i should start a separate thread that basically begins get_matches
# so that all the data is stored locally after about a minute but behind the scenes.
コード例 #6
0
def press(event):
    global _id
    global images
    global like
    global dislike
    global txt
    global fig
    sys.stdout.flush()
    print('you pressed {}'.format(event.key))
    if event.key == 'e':
        print('exit')
        sys.exit()
        raise SystemExit()

    if event.key in ['right', 'left', 'up']:
        if event.key == 'right':
            # Like a user
            tinder_api.like(_id)
            print('you liked')
            text = 'LIKED'
            count = 0
            for _image in images:
                io.imsave(
                    '/home/majid/Ternow-Lovai/data/liked/profile_{}_{}.jpg'.
                    format(_id, count), _image)
                count += 1
                like += 1
                #break
        elif event.key == 'left':
            # Dislike a user
            tinder_api.dislike(_id)
            print('you disliked')
            text = 'DISLIKED'
            count = 0
            for _image in images:
                io.imsave(
                    '/home/majid/Ternow-Lovai/data/disliked/profile_{}_{}.jpg'.
                    format(_id, count), _image)
                count += 1
                dislike += 1
                #break
        elif event.key == 'top':
            # Superlike a user
            tinder_api.superlike(_id)
            print('you superliked')
            text = 'SUPERLIKED'
            count = 0
            for _image in images:
                io.imsave(
                    '/home/majid/Ternow-Lovai/data/liked/profile_{}_{}.jpg'.
                    format(_id, count), _image)
                count += 1
                like += 1
                #break

        #plt.text(5, 5, text, style='italic', bbox={'facecolor':'red', 'alpha':0.5, 'pad':10})
        if text in ['LIKED', 'SUPERLIKED']:
            txt = plt.text(.5,
                           .5,
                           text,
                           fontsize=30,
                           style='italic',
                           bbox={
                               'facecolor': 'green',
                               'alpha': 0.5,
                               'pad': 1
                           })
        elif text == 'DISLIKED':
            txt = plt.text(.5,
                           .5,
                           text,
                           fontsize=30,
                           style='italic',
                           bbox={
                               'facecolor': 'red',
                               'alpha': 0.5,
                               'pad': 1
                           })

        fig.canvas.draw()
        time.sleep(1)
        #plt.show(block=False)
        plt.close('all')
コード例 #7
0
ファイル: entangled.py プロジェクト: sabreitweiser/entangled
    if person.get('schools'):
        for school in person['schools']:
            print('SCHOOL: ' + school['name'])

    if person.get('bio'):
        print('BIO: ' + person['bio'])

    if person.get('distance_mi'):
        print('DISTANCE: ' + str(person['distance_mi']) + ' miles')

    for photo in person['photos']:
        URL = photo['url']
        with urlopen(URL) as url:
            with open('temp.jpg', 'wb') as f:
                f.write(url.read())

        img = Image.open('temp.jpg')
        img.show()

    if dec:
        like(rec)
        print(bcolors.OKGREEN + 'LIKED' + bcolors.ENDC)
    else:
        dislike(rec)
        print(bcolors.FAIL + 'DISLIKED' + bcolors.ENDC)

    for _ in range(5):
        sleep(4 * random())
        print('...')
コード例 #8
0
def _dislike(person_id):
    api.dislike(person_id)