Exemple #1
0
    def like(self, amount=1, ratio='100%', sleep=1):

        ratio = float(ratio.split('%')[0]) / 100

        if self._is_logged_in():
            helper = GeomatchHelper(browser=self.browser)
            amount_liked = 0
            # handle one time up front, from then on check after every action instead of before
            self._handle_potential_popups()
            print("\nLiking profiles started.")
            while amount_liked < amount:
                if random.random() <= ratio:
                    if helper.like():
                        amount_liked += 1
                        # update for stats after session ended
                        self.session_data['like'] += 1
                        print(f"{amount_liked}/{amount} liked")

                else:
                    helper.dislike()
                    # update for stats after session ended
                    self.session_data['dislike'] += 1

                self._handle_potential_popups()
                time.sleep(sleep)

            self._print_liked_stats()
Exemple #2
0
 def superlike(self, amount=1):
     if self._is_logged_in():
         helper = GeomatchHelper(browser=self.browser)
         for _ in range(amount):
             self._handle_potential_popups()
             helper.superlike()
             # update for stats after session ended
             self.session_data['superlike'] += 1
         self._print_liked_stats()
Exemple #3
0
    def superlike(self, amount=1):
        if self.isLoggedIn():
            helper = GeomatchHelper(browser=self.browser)
            loadingbar = LoadingBar(amount, "superlikes")
            for index in range(amount):
                self.handlePotentialPopups()
                helper.superlike()
                # update for stats after session ended
                self.session_data['dislike'] += 1

                # update loadingbar display
                loadingbar.updateLoadingBar(index)
Exemple #4
0
    def get_geomatch(self, quickload=True):
        if self._is_logged_in():
            helper = GeomatchHelper(browser=self.browser)
            self._handle_potential_popups()

            name = None
            attempts = 0
            max_attempts = 20
            while not name and attempts < max_attempts:
                attempts += 1
                name = helper.get_name()
                time.sleep(2)

            age = helper.get_age()
            bio = helper.get_bio()
            image_urls = helper.get_image_urls(quickload)
            rowdata = helper.get_row_data()
            work = rowdata.get('work')
            study = rowdata.get('study')
            home = rowdata.get('home')
            distance = rowdata.get('distance')

            passions = helper.get_passions()

            return Geomatch(name=name,
                            age=age,
                            work=work,
                            study=study,
                            home=home,
                            distance=distance,
                            bio=bio,
                            passions=passions,
                            image_urls=image_urls)
Exemple #5
0
    def like(self, amount=1, ratio='100%', sleep=1):

        ratio = float(ratio.split('%')[0]) / 100

        if self.isLoggedIn():
            helper = GeomatchHelper(browser=self.browser)
            loadingbar = LoadingBar(amount, "likes")
            amount_liked = 0
            # handle one time up front, from then on check after every action instead of before
            self.handlePotentialPopups()
            while amount_liked < amount:
                if random.random() <= ratio:
                    helper.like()
                    amount_liked += 1

                    # update for stats after session ended
                    self.session_data['like'] += 1

                    # update loadingbar display
                    loadingbar.updateLoadingBar(amount_liked)

                else:
                    helper.dislike()

                    # update for stats after session ended
                    self.session_data['dislike'] += 1

                self.handlePotentialPopups()
                time.sleep(sleep)
Exemple #6
0
    def getGeomatch(self):
        if self.isLoggedIn():
            helper = GeomatchHelper(browser=self.browser)
            self.handlePotentialPopups()

            name = None
            attempts = 0
            max_attempts = 20
            while not name and attempts < max_attempts:
                attempts += 1
                name = helper.getName()
                time.sleep(2)

            age = helper.getAge()
            distance = helper.getDistance()
            bio = helper.getBio()
            image_urls = helper.getImageURLS()

            return Geomatch(name=name, age=age, distance=distance, bio=bio, image_urls=image_urls)