Ejemplo n.º 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()
Ejemplo n.º 2
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)
Ejemplo n.º 3
0
    def dislike(self, amount=1):
        if self._is_logged_in():
            helper = GeomatchHelper(browser=self.browser)
            for _ in range(amount):
                self._handle_potential_popups()
                helper.dislike()

                # update for stats after session ended
                self.session_data['dislike'] += 1
            self._print_liked_stats()
Ejemplo n.º 4
0
    def dislike(self, amount=1):
        if self.isLoggedIn():
            helper = GeomatchHelper(browser=self.browser)
            loadingbar = LoadingBar(amount, "dislikes")
            for index in range(amount):
                self.handlePotentialPopups()
                helper.dislike()

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

                # update loadingbar display
                loadingbar.updateLoadingBar(index)