ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.71k stars 1.47k forks source link

Bug in bot_filter.py file #1081

Closed hadiyarajesh closed 4 years ago

hadiyarajesh commented 5 years ago

Purpose of your issue?


Python 3.7.4

Code:

def check_media(self, media_id):
    if self.api.media_info(media_id):
        medias = self.api.last_json["items"]

        if search_blacklist_hashtags_in_media(self, media_id):
            msg = "Blacklist hashtag found in media, skipping!"
            self.console_print(msg, "red")
            return False

        if self.filter_medias(medias, quiet=True):
            return check_user(self, self.get_media_owner(media_id))
        return False

    msg = "Media ID error!"
    self.console_print(msg, "red")
    return False

Error/Debug Log:

2019-10-10 05:52:02,388 - INFO - Instabot Started
2019-10-10 05:52:02,406 - INFO - Instabot Started
2019-10-10 05:52:02,418 - INFO - Instabot Started
Not Liked
Not Liked

Describe your issue

I had encountered a problem while liking media, so i dug deep and found that check_media(self, media_id) method in bot_filter.py file has wrong return type even in success condition. Need to change return type to True from False (on line 86 in bot_filter.py) to make like function working.

84        if self.filter_medias(medias, quiet=True):
85            return check_user(self, self.get_media_owner(media_id))
86        return True
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.