How to use the instapy.like_util.like_image function in instapy

To help you get started, we’ve selected a few instapy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Instagram-Tools / bot / instapy / instapy.py View on Github external
print("--> Total liked image reached it's amount given: ", liked_img)
                    print('')
                    break

                print('Post [{}/{}]'.format(liked_img + 1, amount))
                self.logFile.write('[{}/{}]'.format(liked_img + 1, amount))
                self.logFile.write(link)

                try:
                    inappropriate, user_name, is_video, reason = \
                        check_link(self.browser, link, self.dont_like, self.ignore_if_contains, self.ignore_users,
                                   self.username, self.like_by_followers_upper_limit,
                                   self.like_by_followers_lower_limit)

                    if not inappropriate:
                        liked = like_image(self.browser)

                        if liked:
                            total_liked_img += 1
                            liked_img += 1
                            checked_img = True
                            temp_comments = []
                            commenting = randint(0, 100) <= self.comment_percentage


                            if self.use_clarifai and (following or commenting):
                                try:
                                    checked_img, temp_comments = \
                                        check_image(self.browser,
                                                    self.clarifai_api_key,
                                                    self.clarifai_img_tags,
                                                    self.clarifai_full_match)
github Instagram-Tools / bot / instapy / instapy.py View on Github external
self.blacklist,
                                self.logger,
                                self.logfolder)

                            following = False
                        else:
                            self.logger.info('--> Not following')
                            sleep(1)

                        liking = random.randint(0, 100) <= self.like_percentage
                        
                        if self.do_like and liking and self.delimit_liking:
                            self.liking_approved = verify_liking(self.browser, self.max_likes, self.min_likes, self.logger)
                        
                        if self.do_like and liking and self.liking_approved:
                            liked = like_image(self.browser,
                                               user_name,
                                               self.blacklist,
                                               self.logger,
                                               self.logfolder)
                        else:
                            liked = True

                        if liked:
                            total_liked_img += 1
                            liked_img += 1
                            checked_img = True
                            temp_comments = []
                            commenting = random.randint(
                                0, 100) <= self.comment_percentage

                            if self.use_clarifai and (following or commenting):
github Instagram-Tools / bot / instapy / instapy.py View on Github external
self.logger.info(link)

                try:
                    inappropriate, user_name, is_video, reason, scope = (
                        check_link(self.browser,
                                   link,
                                   self.dont_like,
                                   self.ignore_if_contains,
                                   self.logger)
                    )

                    if not inappropriate and self.delimit_liking:
                        self.liking_approved = verify_liking(self.browser, self.max_likes, self.min_likes, self.logger)

                    if not inappropriate and self.liking_approved:
                        liked = like_image(self.browser,
                                           user_name,
                                           self.blacklist,
                                           self.logger,
                                           self.logfolder)

                        if liked:
                            total_liked_img += 1
                            liked_img += 1
                            checked_img = True
                            temp_comments = []
                            commenting = random.randint(
                                0, 100) <= self.comment_percentage

                            if self.use_clarifai and (following or commenting):
                                try:
                                    checked_img, temp_comments = (
github Instagram-Tools / bot / instapy / instapy.py View on Github external
self.potency_ratio,
                                                       self.delimit_by_numbers,
                                                       self.max_followers,
                                                       self.max_following,
                                                       self.min_followers,
                                                       self.min_following,
                                                       self.logger)
                        if validation != True:
                            self.logger.info(details)
                            not_valid_users += 1
                            continue
                        else:
                            web_adress_navigator(self.browser, link)

                        #try to like
                        liked = like_image(self.browser,
                                           user_name,
                                           self.blacklist,
                                           self.logger,
                                           self.logfolder)

                        if liked:
                            liked_img += 1
                            checked_img = True
                            temp_comments = []
                            commenting = random.randint(
                                0, 100) <= self.comment_percentage
                            following = random.randint(
                                0, 100) <= self.follow_percentage

                            if self.use_clarifai and (following or commenting):
                                try:
github Instagram-Tools / bot / instapy / instapy.py View on Github external
self.potency_ratio,
                                                               self.delimit_by_numbers,
                                                               self.max_followers,
                                                               self.max_following,
                                                               self.min_followers,
                                                               self.min_following,
                                                               self.logger)
                                if validation != True:
                                    self.logger.info(details)
                                    not_valid_users += 1
                                    continue
                                else:
                                    web_adress_navigator(self.browser, link)

                                #try to like
                                liked = like_image(self.browser,
                                                   user_name,
                                                   self.blacklist,
                                                   self.logger,
                                                   self.logfolder)

                                if liked:
                                    username = (self.browser.
                                                find_element_by_xpath(
                                                    '//article/header/div[2]/'
                                                    'div[1]/div/a'))

                                    username = username.get_attribute("title")
                                    name = []
                                    name.append(username)

                                    if interact: