Esempio n. 1
0
def main():
    config = ConfigManager()
    config.set_many(DEFAULT_CONFIG)
    _config = ConfigManager(schema=schema, defaults=defaults)
    config.set_many(_config.as_dict())
    config.set_many(ConfigManager(path=_config.get('config.file')).as_dict())
    config.set_many(_config.as_dict())
    config.commit()

    if config.get('dump_configuration'):
        conf = config.as_dict()
        conf.pop('config42')
        print(yaml.dump(conf))
        exit(0)
    if config.get('show_version'):
        print(instabot_py.__version__)
        exit(0)

    if config.get('verbosity'):
        verbosity = int(config.get('verbosity'))
        if verbosity == 1:
            level = logging.INFO
        elif verbosity > 1:
            level = logging.DEBUG
        config.set("logging.root.level", level)

    logging.config.dictConfig(config.get("logging"))
    bot = InstaBot(config=config)
    bot.mainloop()
Esempio n. 2
0
def main():
    config = ConfigManager()
    config.set_many(DEFAULT_CONFIG)
    _config = ConfigManager(schema=schema, defaults=defaults)
    config.set_many(_config.as_dict())
    config.set_many(
        ConfigManager(schema=schema,
                      path=_config.get('config.file')).as_dict())
    config.set_many(_config.as_dict())
    config.commit()

    if config.get('dump_configuration'):
        conf = config.as_dict()
        conf.pop('config42')
        print(yaml.dump(conf))
        exit(0)
    if config.get('show_version'):
        print("Installed version {}".format(instabot_py.__version__))
        exit(0)

    if not config.get('ignore_updates'):
        last_version = get_last_version()
        if last_version and last_version != instabot_py.__version__:
            print(
                "Newer version available: {}, The current version: {}".format(
                    last_version, instabot_py.__version__))
            print(
                "To update, please type \n python3 -m pip install instabot-py --upgrade --no-cache-dir "
            )
            print("")
            print(
                "  > You can ignore warning, run the instabot with --ignore-updates flag"
            )
            exit(0)

    if config.get('verbosity'):
        verbosity = int(config.get('verbosity'))
        if verbosity == 1:
            level = logging.INFO
        elif verbosity > 1:
            level = logging.DEBUG
        config.set("logging.root.level", level)

    logging.config.dictConfig(config.get("logging"))
    try:
        bot = InstaBot(config=config)
    except CredsMissing:
        print(
            "You didn't provide your Instagram login & password or you didn't specify the configuration file"
        )
        print("Try again :")
        print("")
        print("   instabot-py --login YOUR_LOGIN --password YOUR_PASSWORD")
        print("   instabot-py -c your-config.yml")
        print(
            "You can export and modify the default configuration by typing the command below"
        )
        print("    instabot-py --dump")
        exit(1)
    bot.mainloop()
Esempio n. 3
0
def main():
    if len(sys.argv) > 1:
        param = sys.argv[1].lower()
        if param == "--":
            configdict = {}
        else:
            configdict = interactive(param, loaded_with_argv=True)
    else:
        configdict = interactive()

    bot = InstaBot(**configdict)
    bot.mainloop()
Esempio n. 4
0
def main():
    print("The interactive mode is deprecated. Please use the declarative mode with YAML settings\n"
          "Please refer to Github README + (instabot -h) + Blog section for further information")
    _ = input("Press Enter to continue. ")

    if len(sys.argv) > 1:
        param = sys.argv[1].lower()
        configdict = interactive(param, loaded_with_argv=True)
    else:
        configdict = interactive()

    bot = InstaBot(**configdict)

    bot.mainloop()
Esempio n. 5
0
def login():
    global instabot, client

    instabot = InstaBot(like_per_day=config['max_likes'],
                        login=config['ig_username'],
                        password=config['ig_password'],
                        session_file=config['cookie_name'],
                        log_mod=2)

    # Telegram client
    client = TelegramClient(config['session'], config['telegram_api_id'],
                            config['telegram_api_hash'])
    client.flood_sleep_threshold = 24 * 60 * 60  # Sleep always
Esempio n. 6
0
def bot(tmp_path, cwd):
    from instabot_py import InstaBot
    import logging.config
    _config = ConfigManager(defaults={'config42': OrderedDict(
        [
            ('env', {'prefix': 'INSTABOT'}),
            ('file', {'path': cwd + '/files/instabot.config.yml'}),
        ]
    )})
    logging.basicConfig(level=logging.DEBUG)
    return InstaBot(**_config.as_dict(),
                    session_file=str(tmp_path / "requests.session"),
                    database={
                        "type": "sql",
                        "connection_string": "sqlite:///" + str(tmp_path / "sqlite.db")})
Esempio n. 7
0
def login():
    global instabot, client, user_followers, user_following, user_media

    instabot = InstaBot(like_per_day=config['max_likes'],
                        login=config['ig_username'],
                        password=config['ig_password'],
                        session_file=config['cookie_name'],
                        unfollow_recent_feed=False,
                        log_mod=2)

    # Telegram client
    client = TelegramClient(config['session'], config['telegram_api_id'],
                            config['telegram_api_hash'])
    client.flood_sleep_threshold = 24 * 60 * 60

    get_user_info(instabot, config['ig_username'])
    user_followers = instabot.current_user_info["edge_followed_by"]["count"]
    user_following = instabot.current_user_info["edge_follow"]["count"]
    user_media = instabot.current_user_info["edge_owner_to_timeline_media"][
        "count"]

    return [user_followers, user_following, user_media]
Esempio n. 8
0
def main():
    if not os.path.isfile(config_location):
        overwrite_answer = None
        while overwrite_answer not in ("yes", "no", "n", "y"):
            overwrite_answer = input(
                "Config file does not exist. Would you like to setup now? (yes/no): "
            )
            if overwrite_answer == "no" or overwrite_answer == "n":
                exit()
        setupinteractive(config, config_location)

    askusername = None
    loaded_with_argv = False

    try:
        if len(sys.argv[1]) > 3:
            askusername = sys.argv[1]
            loaded_with_argv = True
    except:
        askusername = None

    config.read(config_location)

    if askusername is None:
        askusername = input(
            '     _____Instabot Login_____\n     (To change user settings, type "config")\n     Please enter your username: '******'{sys.argv[0]} {askusername}')'"
                )
            except:
                print(
                    "     (Tip: Log in directly by appending your username at the end of the script)"
                )

    else:
        if "yes" in input(
                "Could not find user in settings. Would you like to add now? (yes/no): "
        ):
            setupinteractive(config, config_location)
        else:
            exit()

    print("\n     ______Starting bot_____")

    configdict = dict(config.items(askusername))

    for _setting, _value in configdict.items():

        try:
            if "{" in _value or "[" in _value:
                json.loads(_value)
                configdict[_setting] = json.loads(_value)
            else:
                raise ValueError
        except ValueError:
            if _value.isdigit() is True:
                configdict[_setting] = int(_value)
            pass

    configdict["login"] = configdict.pop("username")

    bot = InstaBot(**configdict)
    while True:
        bot.new_auto_mod()
Esempio n. 9
0
bot = InstaBot(
    login="",  # Enter username (lowercase). Do not enter email!
    password="",
    like_per_day=800,
    comments_per_day=0,
    #tag_list=["kazan","казань"],
    tag_list=[
        "l:221630742", "l:951779366", "l:219244324", "l:219842857",
        "l:221130590", "l:213094418", "l:383309025", "l:213339659",
        "иннополис", "innopolis", "нижнийновгород", "чебоксары", "уфа",
        "самара", "набережныечелны", "альметьевск", "cheboksary", "ufa",
        "nizhninovgorod", "naberezhnyyechelny", "kazan", "казань", "ремонт",
        "дизайн", "интерьер", "отделка", "строительство", "дизайнинтерьера",
        "ламинат", "design", "обои", "стройка", "interior", "декор",
        "квартира", "дом", "ванная", "акция", "apple", "tiler", "услуги",
        "renovator", "job", "floor", "builder", "унистрой"
    ],
    #tag_list=["l:221630742","l:951779366","l:219244324","l:219842857","l:221130590","l:213094418","l:383309025","l:213339659","иннополис","innopolis","нижнийновгород","чебоксары","уфа","самара","набережныечелны","альметьевск","cheboksary","ufa","nizhninovgorod","naberezhnyyechelny","kazan","казань","coverband","музыка","музыканты","музыкаказани","казаньмузыка","music","musicinkazan","kazanmusic","musical","musician","musicband","rockband"],
    tag_blacklist=[],
    user_blacklist={},
    max_like_for_one_tag=1000,
    follow_per_day=200,
    follow_time=1 * 60 * 60,
    unfollow_per_day=300,
    unlike_per_day=5000,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[
        ["this", "the", "your"],
        ["photo", "picture", "pic", "shot"],
        ["is", "looks", "is ??", "is really"],
        [
            "great",
            "super",
            "good",
            "very good",
            "good",
            "wow",
            "WOW",
            "cool",
            "GREAT",
            "magnificent",
            "magical",
            "very cool",
            "stylish",
            "beautiful",
            "so beautiful",
            "so stylish",
            "so professional",
            "lovely",
            "so lovely",
            "very lovely",
            "glorious",
            "so glorious",
            "very glorious",
            "adorable",
            "excellent",
            "amazing",
        ],
        [".", "??", "... ??", "!", "! ??", "??"],
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "shop",
        "store",
        "sex",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "tech",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 9, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 10
0
bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=900,
    comments_per_day=0,
    tag_list=[
        "veggie", "vidavegana", "cocinavegana", "comida", "animal", "vegan",
        "vegano", "vegetariano", "rosario", "santafe", "pedidosya", "glovo",
        "rappi"
    ],
    tag_blacklist=[],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60 * 60,
    unfollow_per_day=300,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[
        ["esta", "la", "tu"],
        ["idea", "receta"],
        ["es", "parece"],
        ["genial", "muy buena", "tremenda", "muy rica"],
        [".", "🙌", "... 👏", "!", "! 😍", "😎"],
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 9, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 11
0
bot = InstaBot(
    login=
    "******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=1000,
    tag_list=tag_list,
    tag_blacklist=[
        "mukbang", "mukbangasmr", "mukbangs", "mukbangfood", "nsfw", "sex",
        "asmr", "asmreating"
    ],
    user_blacklist={},
    max_like_for_one_tag=30,
    media_max_like=300,
    log_mod=1,
    proxy="",
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second", "stuff", "art", "project", "love", "life", "blog", "free",
        "keren", "photo", "graphy", "indo", "travel", "art", "shop", "store",
        "sex", "toko", "jual", "online", "murah", "jam", "kaos", "case",
        "baju", "fashion", "corp", "tas", "butik", "grosir", "karpet", "sosis",
        "salon", "skin", "care", "cloth", "tech", "rental", "kamera", "beauty",
        "express", "kredit", "collection", "impor", "preloved", "follow",
        "follower", "gain", ".id", "_id", "bags"
    ],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 55, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 6, # Hour you want the bot to start
    # start_at_m = 00, # Minute you want the bot to start, in this example 9:10 (am).
    database_name="bger.db",
    session_file="bger.session")
bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=[
        'انقلاب_برای_انقلاب',
        'پویش_آرایش_جنگی',
        'آرایش_جنگی',
        'خلیج_فارس',
        'مرگ_بر_آمریکا',
        'پشتیبان_سپاه_هستیم',
        'پهباد',
        'نفوذ',
        'من_انقلابی_ام',
        'ولایت_فقیه',
        'دوران_بزن_در_رو_تمام_شد',
        'گام_دوم_انقلاب',
        'قاتلین_اجاره_ای',
        'سید_ابراهیم_رئیسی',
        'محمد_باقر_قالیباف',
        'عدالت_خواهی',
        'ننگ_برجام',
    ],
    tag_blacklist=[
        'دوباره_ایران',
        'همجنس_بازی',
        'فاعل',
        'سکس',
        'داف',
        'لخت',
    ],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60 * 60,
    unfollow_per_day=300,
    unlike_per_day=0,
    unfollow_recent_feed=False,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[
        "پرفکت مشتی هستی با مرام",
        "لایو نمیزارین شما ؟",
        "❤️❤️❤️",
        "kheili ham shik 😍 😘",
        "لایک به تو ای جان",
        "😍😍 wow 😍😍",
        "WOW 😍",
        "عالیه پسر 😍 😘",
        "Like",
        "jazzab",
        "dadash ❤️",
        "best bro ❤️",
        "harf nadari ❤️❤️❤️❤️",
        "❤️❤️",
        "jazabe ki bodi ❤️🔥",
        "harf nadari 🔥",
        "awlie",
        "mikhamet ❤️❤️❤️",
        "soltan ❤️❤️❤️",
        "mareke ❤️❤️❤️",
        "همیشه بدرخشی ❤️❤️❤️",
        "حرف نداری ❤️❤️❤️",
        "yedoonei ❤️",
        "ناموسا لایک",
        "واقعا خوشم اومد ",
        "باعث افتخارهتو پیج شماییم❤️",
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "shop",
        "store",
        "sex",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "tech",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 8, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 13
0
bot = InstaBot(
    login="******",
    password="******",
    like_per_day=1500,
    comments_per_day=0,
    tag_list=[
        'follow4follow', 'f4f', 'cute', 'meme', 'memes', 'memesdaily',
        'dailymemes', 'funny', 'follow', 'funnymemes', 'humor', 'smile',
        'relatable', 'meirl', 'me_irl', 'dankmemes', 'deepfriedmemes', 'happy',
        'instadaily', 'gaming', 'teenagers', 'wholesome', 'science',
        'millenials', 'twitter', 'spongebob', 'spongebobmemes', 'whitepeople',
        'programming', 'programminghumor'
    ],
    tag_blacklist=["rain", "thunderstorm"],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60 * 60,
    unfollow_per_day=300,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[
        ["this", "the", "your"],
        ["photo", "picture", "pic", "shot"],
        ["is", "looks", "is 👉", "is really"],
        [
            "great",
            "super",
            "good",
            "very good",
            "good",
            "wow",
            "WOW",
            "cool",
            "GREAT",
            "magnificent",
            "magical",
            "very cool",
            "stylish",
            "beautiful",
            "so beautiful",
            "so stylish",
            "so professional",
            "lovely",
            "so lovely",
            "very lovely",
            "glorious",
            "so glorious",
            "very glorious",
            "adorable",
            "excellent",
            "amazing",
        ],
        [".", "🙌", "... 👏", "!", "! 😍", "😎"],
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "shop",
        "store",
        "sex",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "tech",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 9, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 14
0
bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=1500,
    comments_per_day=100,
    tag_list=['l4l', 'فالو', 'فالوور', 'likeforlike', 'لایک', 'کامنت', 'عکس', 'عکاسی','ایرانی'],
    tag_blacklist=["rain", "thunderstorm"],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=0,
    follow_time=1 * 60 * 60,
    unfollow_per_day=0,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[["This", "The", "Your",],
                  ["photo 📷", "photo", "picture 📷", "picture", "pic 📷", "pic", "shot", "shot 📷", "snapshot 📷", "snapshot", "post"],
                  ["is", "looks", "feels", "is really"],
                  ["great 😊", "super 💣", "good 😍", "very good 😄", "good 😁", "wow 😆",
                   "WOW 😅", "cool 😂", "GREAT 🙂","magnificent 😉", "magical 😊",
                   "very cool 😇", "stylish 😇", "beautiful 🥰", "so beautiful 😍",
                   "so stylish 😘", "so professional ☺️", "lovely 😗",
                   "so lovely 😚", "very lovely 😚", "glorious 😌","so glorious 😎",
                   "very glorious 👽", "adorable 😺", "excellent 🖖", "amazing 👌"
				   "great 👍", "super 💪", "good 👀", "excellent", "magnificent", "beautiful",],
                  ["😍", "😀", "😃", "😄", "😄", "😁", "😆", "😅", "🙂", "😉", "😊", "😍", "☺️",
				   "😘", "😌", "😈", "💀", "👻", "👽", "🖐️", "🖖", "👌", "✌️", "👍", "💪", "👀",
				   "👁️", "👦", "🎈", "💎"]],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "shop",
        "store",
        "sex",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "tech",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 9, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 15
0
bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=500,
    comments_per_day=200,
    tag_list=["شرکت", "کامپیوتری", "برنامه نویسی", "استخدام", "استارتاپ", "کارآفرینی", "تکنولوژی", "فناوری", "طراحی سایت", "فالو"],
    tag_blacklist=["f**k"],
    user_blacklist={},
    max_like_for_one_tag=1000,
    follow_per_day=200,
    follow_time=5 * 60 * 60,
    unfollow_per_day=0,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[
        ["ممنون", "متشکریم"],
        ["پیجتون", "صفحتون"],
        ["واقعا", "حقیقتا", "خیلی"],
        ["عالیهه","عالیه",],
        ["👌ممنون میشم پیج ماهم دنبال کنید","🙏ممنون میشم پیج ماهم دنبال کنید","👍ممنون میشم پیج ماهم دنبال کنید"],
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 9, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 16
0
bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=2500,
    comments_per_day=500,
    tag_list=["follow4follow", "f4f", "cute", "l:212999109"],
    tag_blacklist=["jomfollow", "followback"],
    user_blacklist={},
    max_like_for_one_tag=10,
    follow_per_day=1000,
    follow_time=1 * 60 * 60,
    unfollow_per_day=500,
    unlike_per_day=300,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[
        ["mai follow back🙌", "follow back👏", "dah follow, jom follow back👏"],
        [
            "meh follow", "letsgo follow back👏", "wow jom follow back👏",
            "follow back👏"
        ],
        ["is", "looks👏", "is 👉", "is really"],
        [
            "FOLLOW BACK😍",
            "JOM FOLLOW BACK😍",
        ],
        [".", "🙌", "... 👏", "!", "! 😍", "😎"],
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "shop",
        "store",
        "sex",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "tech",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 9, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 17
0
from instapy.util import smart_run
from secret import Secret

# I input the post and it goes and does the actions
# login credentials
user_login = Secret.user_login
user_password = Secret.user_password

#other function: make sure post is in english,
#other function: watch certain accounts for giveaways (retreat..)

########### just need to add in commenting and
# TODO add in "repost" function

# Logs in the instagram bot
bot = InstaBot(user_login, user_password)

def check_for_actions(post):
    caption = post['caption'].lower()

    if 'follow' in caption:
        # If it sees follow, follow the poster's profile
        # TODO add in possibly following others
        print('Follow found.')
        profile = post['username']
        follow_profile(post)

    if 'like' or 'double tap' or 'double-tap' in caption:
        # Likes the post
        print('Like found.')
        post_to_like = post['post_link']
Esempio n. 18
0
bot = InstaBot(
    login=
    "******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=[
        "chronicillness", "chronicpain", "chronicillness", "chronicpain",
        "chronicdisease", "wfh", "lymewarrior", "lymedisease",
        "invisibleillness", "painsucks", "cancersucks", "autoimmunedisease",
        "cancerawareness", "beatcancer", "cancersupport", "chrons", "lupus",
        "healthanxiety", "fibrowarrior", "healthanxiety",
        "chronickidneydisease", "tickbornedisease", "painsucks", "spoonie",
        "butyoudontlooksick", "workfromhome", "lupus", "themighty",
        "friendsinthefight", "fastcompany", "fuckcancer",
        "sufferingthesilence", "spooniestrong", "remission", "autoimmune",
        "chronicpainwarrior", "autoimmunewarrior", "spoonielife",
        "spooniesisters", "lymedontkillmyvibe", "lyme", "endo", "anxiety",
        "chronicpainawareness", "invisibleillnesswarrior", "spooniesupport",
        "chronicfatigue", "youdontlooksick", "ehlersdanlos", "selfcarematters",
        "chroniclife", "disability", "spooniewarrior", "mentalhealthday",
        "butyoudontlooksick", "communitymatters", "chronicillnesslife",
        "invisibleillnessawareness", "selfcarematters", "spooniesister",
        "invisibledisability", "sufferingthesilence", "asl", "deafcommunity",
        "americansignlanguage", "therapy", "depression",
        "mentalillnessawareness", "speakyourtruth", "healthcareisahumanright",
        "bethechange", "diabetesawareness", "accessibility", "type1diabetes",
        "type1life", "womenshealth", "insulinpump", "disabled",
        "imapreexistingcondition", "potsie", "dysautonomia", "crps",
        "wheelchairlife", "disabledandcute", "depressionwareness",
        "anxietyquote", "chronicdisease"
    ],
    tag_blacklist=[
        "rain", "thunderstorm", "sex", "p**n", "adulting", "alone",
        "americangirl", "ariefmirna2015", "armparty", "asia", "asiandick",
        "attractive", "babyrp", "bacak", "badbitcztwerk", "baddie",
        "balenciaga", "balls", "bang", "bangbang", "batikate", "beaty",
        "belfie", "bi", "bigdickboy", "bikinibody", "bombshell", "bootay",
        "bootybounce", "bra", "brain", "breast", "buns", "butt", "butts",
        "cam", "carving", "catsau", "cesitone", "cheeky", "citycentre",
        "commentschivettes", "costumes", "cph", "cpr", "csun", "cumfession",
        "curvesfordays", "curvy", "damngirl", "datass", "date", "dating",
        "desk", "direct", "dm", "dominant", "dripping", "dutchgirl", "dxb",
        "easter", "ebonyandivory", "edm", "edmbabes", "eggplant", "eggplants",
        "eggporn", "elevator", "escilepernatale", "estellaseraphim",
        "everybodyisbeautiful", "excitada", "expose", "fapstagram",
        "feetofatlanta", "fishnets", "foreplay", "freakshow", "freethenipple",
        "gays", "gilofashion", "girlsonly", "gloves", "goddess",
        "hamishnadine", "happythanksgiving", "hardsummer", "hijabiba",
        "hooters", "hornyyyyyyasf", "hotgirls", "hotguy", "hots", "hottie",
        "humpday", "iamgay", "instagirl", "instamood", "istanbulgay",
        "italiano", "jugs", "kansas", "kickoff", "kik", "kikgirl",
        "kikmessenger", "killingit", "kissing", "lesbian",
        "lesbiansofinstagram", "lilmandingo", "lingerie", "lust", "marcoreus",
        "master", "mebelim", "medicina", "mexicangirl", "mirrorphoto",
        "mixedgirls", "models", "mr40club", "mrsandmrsbordeaux", "mrtox",
        "nacket", "nasty", "newyears", "newyearsday", "ngento", "oovoo",
        "petite", "piroka", "pixie", "poop", "pornfood", "printic",
        "publicrelations", "pushups", "rack", "ravebabes", "roleplay",
        "russiangirl", "russianmilf", "saltwater", "sexlife", "shebad",
        "shesquats", "shit", "shower", "single", "singlelife", "skype",
        "slimthick", "snap", "snapback", "snapchat", "snapchatgay", "snapme",
        "sokus", "sopretty", "spanishgirl", "sparklingnudes",
        "stopdropandyoga", "stranger", "streetphoto", "stud", "submission",
        "sultry", "sunbathing", "swole", "tag4like", "takeitoff", "teens",
        "tgif", "thatasstho", "thick", "thought", "todayimwearing", "treviso",
        "twerk", "twerker", "undies", "valentinesday", "vatine", "weed",
        "weedstagram", "weezmoney", "wet", "whitegirl", "woman",
        "womancrushwednesday", "women", "workflow"
    ],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60 * 60,
    unfollow_per_day=350,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "shop",
        "store",
        "sex",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "tech",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    end_at_h=23,  # Hour you want the bot to stop
    end_at_m=30,  # Minute you want the bot stop, in this example 23:30
    start_at_h=9,  # Hour you want the bot to start
    start_at_m=
    10,  # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 19
0
)

bot = InstaBot(
    login=config[usrconfig]["username"],
    password=config[usrconfig]["password"],
    like_per_day=int(config[usrconfig]["like_per_day"]),
    comments_per_day=int(config[usrconfig]["comments_per_day"]),
    tag_list=json.loads(config[usrconfig]["tag_list"]),
    tag_blacklist=json.loads(config[usrconfig]["tag_blacklist"]),
    user_blacklist={},
    max_like_for_one_tag=int(config[usrconfig]["max_like_for_one_tag"]),
    follow_per_day=int(config[usrconfig]["follow_per_day"]),
    follow_time=int(config[usrconfig]["follow_time"]),
    unfollow_per_day=int(config[usrconfig]["unfollow_per_day"]),
    unfollow_break_min=int(config[usrconfig]["unfollow_break_min"]),
    unfollow_break_max=int(config[usrconfig]["unfollow_break_max"]),
    log_mod=int(config[usrconfig]["log_mod"]),
    proxy=config[usrconfig]["proxy"],
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=json.loads(config[usrconfig]["comment_list"]),
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=json.loads(
        config[usrconfig]["unwanted_username_list"]),
    unfollow_whitelist=json.loads(config[usrconfig]["unfollow_whitelist"]),
    database_name=f"{usrconfig}.db",
    session_file=f"{usrconfig}.session",
)

while True:
Esempio n. 20
0
bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=500,
    comments_per_day=25,
    tag_list=["gama", "gamadf", "l:497679289", "educacao", "admgama", "santamariadf", "l:334593103669164", "unipead"],
    tag_blacklist=["rain", "thunderstorm"],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 72 * 60 * 60,
    unfollow_per_day=100,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[
        ["esta", "a", "sua"],
        ["fotografia", "foto", "cena", "imagem"],
        ["é", "parece", "é 👉", "é realmente"],
        [
            "ótima",
            "super maravilhosa",
            "boa",
            "muito boa",
            "notável",
            "wow",
            "WOW",
            "legal",
            "MARAVILHOSA",
            "magnífica",
            "mágica",
            "muito legal",
            "estilosa",
            "linda",
            "muito linda",
            "muito estilosa",
            "muito profissional",
            "adorável",
            "muito adorável",
            "tão adorável",
            "gloriosa",
            "tão gloriosa",
            "muito gloriosa",
            "tão surpreendente",
            "excelente",
            "surpreendente",
        ],
        [".", "🙌", "... 👏", "!", "! 😍", "😎"],
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "shop",
        "store",
        "sex",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "tech",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["gamacidadao", "unipeadgama", "unipead", "objetivo.gama", "danrleypereira", "israel.gama"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 9, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 21
0
bot = InstaBot(
    login="******",
    password=base64.b64decode(b'cmVnaVNwZWs3').decode('utf-8'),
    like_per_day=200,
    comments_per_day=300,
    tag_list=['naturephotography', 'urbanphotography', 'scuba'],
    tag_blacklist=['nsfw'],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=150,
    follow_time=1 * 60,
    unfollow_per_day=300,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[[
        "Wow, amazing shot!", "So beautiful! ❤️", "🔥 🔥 🔥", "Epic!!",
        "Such a great snap!", "Amazing!!", "So jealous of this shot 😀",
        "Great snap 👍", "Yaaaaaassss 👌"
    ]],
    # Use unwanted_username_list to block usernames containing a string
    ## Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    ### 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[],
    unfollow_whitelist=[])
Esempio n. 22
0
bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=400,
    comments_per_day=100,
    tag_list=["bestoftheday",
        "cleaneatingrecipe",
        "cleaneatingchallenge",
        "nutrition",
        "food",
        "livinghealthy",
        "inspiration",
        "foodiev",
        "feedfeed",
        "cleaneating",
        "healthyfood"
        "wholefood",
        "gettinghealthy",
        "cleaneatingideas",
        "healthfood",
        "cleaneatingaddict",
        "foodgram",
        "healthylifestyle",
        "healthyeating",
        "foodstagram",
        "cleaneats",
        "cleaneatinglifestyle",
        "fitness",
        "wholefoods",
        "lifestyle",
        "breakfast",
        "delicious",
        "brunch",
        "organicfood",
        "organic"
        ],
    tag_blacklist=["rain", "thunderstorm", "follow4follow"],
    user_blacklist={},
    max_like_for_one_tag=35,
    follow_per_day=250,
    follow_time=1 * 60 * 60,
    unfollow_per_day=0,
    unlike_per_day=20,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    # We're giving away Udemy Courses for FREE👀 DM if interested🎉
    comment_list=[
        ["That's awesome💖👀"],
        ["We'd",],
        ["apprecieate"],
        ["if you"],
        ["checked us out"],
        ["if you feel like it💕"]
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "shop",
        "store",
        "sex",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    # end_at_h = 23, # Hour you want the bot to stop
    # end_at_m = 30, # Minute you want the bot stop, in this example 23:30
    # start_at_h = 9, # Hour you want the bot to start
    # start_at_m = 10, # Minute you want the bot to start, in this example 9:10 (am).
)
Esempio n. 23
0
def test_import():
    from instabot_py import InstaBot
    bot = InstaBot(login='******', password='******')
    assert bot is not None
Esempio n. 24
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from instabot_py import InstaBot

bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=["follow4follow", "f4f", "cute", "l:212999109"],
    tag_blacklist=["rain", "thunderstorm"],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60 * 60,
    unfollow_per_day=300,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    follow_only_more_than_him=True
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=10,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
Esempio n. 25
0
def mass_action(credentials, usernames_to_follow):
    for cred in credentials:
        print(cred)

        bot = InstaBot(
            login=cred["username"],  # Enter username (lowercase). Do not enter email!
            password=cred["password"],
            like_per_day=1000,
            comments_per_day=0,
            tag_list=["crypto", "cryptocurrency", "blockchain", "finance", "money", "media", "film", "entertainment", "music", "follow4follow", "f4f", "l:212999109"],
            tag_blacklist=["rain", "thunderstorm"],
            user_blacklist={},
            max_like_for_one_tag=50,
            follow_per_day=300,
            follow_time=1 * 60 * 60,
            unfollow_per_day=300,
            unlike_per_day=0,
            unfollow_recent_feed=True,
            # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
            time_till_unlike=3 * 24 * 60 * 60,  # 3 days
            unfollow_break_min=15,
            unfollow_break_max=30,
            user_max_follow=0,
            # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
            user_min_follow=0,
            log_mod=0,
            proxy="",
            # List of list of words, each of which will be used to generate comment
            # For example: "This shot feels wow!"
            comment_list=[
                ["this", "the", "your"],
                ["photo", "picture", "pic", "shot"],
                ["is", "looks", "is 👉", "is really"],
                [
                    "great",
                    "super",
                    "good",
                    "very good",
                    "good",
                    "wow",
                    "WOW",
                    "cool",
                    "GREAT",
                    "magnificent",
                    "magical",
                    "very cool",
                    "stylish",
                    "beautiful",
                    "so beautiful",
                    "so stylish",
                    "so professional",
                    "lovely",
                    "so lovely",
                    "very lovely",
                    "glorious",
                    "so glorious",
                    "very glorious",
                    "adorable",
                    "excellent",
                    "amazing",
                ],
                [".", "🙌", "... 👏", "!", "! 😍", "😎"],
            ],
            # Use unwanted_username_list to block usernames containing a string
            # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
            # 'free_followers' will be blocked because it contains 'free'
            unwanted_username_list=[
                "second",
                "stuff",
                "art",
                "project",
                "love",
                "life",
                "food",
                "blog",
                "free",
                "keren",
                "photo",
                "graphy",
                "indo",
                "travel",
                "art",
                "shop",
                "store",
                "sex",
                "toko",
                "jual",
                "online",
                "murah",
                "jam",
                "kaos",
                "case",
                "baju",
                "fashion",
                "corp",
                "tas",
                "butik",
                "grosir",
                "karpet",
                "sosis",
                "salon",
                "skin",
                "care",
                "cloth",
                "tech",
                "rental",
                "kamera",
                "beauty",
                "express",
                "kredit",
                "collection",
                "impor",
                "preloved",
                "follow",
                "follower",
                "gain",
                ".id",
                "_id",
                "bags",
            ],
            unfollow_whitelist=[],
        )
        # bot.follow_by_username(usernames=usernames_to_follow)
        bot.like_all_media_by_username(usernames=usernames_to_follow)
        # bot.like_all_media_by_username(usernames=usernames_to_follow)



    return
Esempio n. 26
0
def main():
    config = ConfigManager()
    config.set_many(DEFAULT_CONFIG)
    _config = ConfigManager(schema=schema, defaults=defaults)
    config.set_many(_config.as_dict())
    config_file = _config.get('config.file')
    config.set_many(ConfigManager(schema=schema, path=config_file).as_dict())
    config.set_many(_config.as_dict())
    config.commit()

    configure_logging(config)
    if config.get('dump_configuration'):
        conf = config.as_dict()
        conf.pop('config42')
        conf.pop('dump_configuration')
        print(yaml.dump(conf))
        exit(0)
    if config.get('show_version'):
        print("Installed version {}".format(instabot_py.__version__))
        exit(0)

    if not config.get('ignore_updates'):
        last_version = get_last_version()
        if last_version and LooseVersion(last_version) > LooseVersion(
                instabot_py.__version__):
            print(
                "Newer version available: {}, The current version: {}".format(
                    last_version, instabot_py.__version__))
            print(
                "To update, please type \n python3 -m pip install instabot-py --upgrade --no-cache-dir "
            )
            print("")
            print(
                "  > You can ignore warning, run the instabot with --ignore-updates flag"
            )
            exit(0)

    try:
        bot = InstaBot(config=config)
        if config_file:
            bot.logger.info(
                f"Reading configuration ({len(_config.as_dict())} settings) from {config_file}"
            )
        else:
            bot.logger.info(
                f"Use the default configuration, add '-c your-config.yml' to specify your config"
            )

    except CredsMissing:
        print(
            "You didn't provide your Instagram login & password or you didn't specify the configuration file"
        )
        print("Try again :")
        print("")
        print("   instabot-py --login YOUR_LOGIN --password YOUR_PASSWORD")
        print("   instabot-py -c your-config.yml")
        print(
            "You can export and modify the default configuration by typing the command below"
        )
        print("    instabot-py --dump")
        exit(1)
    bot.mainloop()
Esempio n. 27
0
def main():
    if not os.path.isfile(config_location) and not os.path.isfile(
            "config.ini"):
        overwrite_answer = None
        while overwrite_answer not in ("yes", "no", "n", "y"):
            overwrite_answer = ask_question(
                "Config file does not exist. Would you like to setup now? (yes/no): "
            )
            overwrite_answer = overwrite_answer.lower()
            if overwrite_answer == "no" or overwrite_answer == "n":
                exit()
        setupinteractive(config, config_location)

    askusername = None
    loaded_with_argv = False

    try:
        if len(sys.argv[1]) > 3:
            askusername = sys.argv[1]
            askusername = askusername.lower()
            loaded_with_argv = True
    except:
        askusername = None

    if os.path.isfile(config_location):
        config.read(config_location)
    elif os.path.isfile("config.ini"):
        config.read("config.ini")

    while askusername is None:
        askusername = ask_question(
            "Please enter your username:"******"config"',
            header=" Instabot Login",
            prepend="@",
        )
        askusername = askusername.lower()
        if len(askusername) < 3:
            askusername = None

    if askusername[0] == "@":
        askusername = askusername[1:]

    if askusername == "config":
        setupinteractive(config, config_location)
    elif askusername in config:
        print(f"     Loading settings for {askusername}!")
        if os.path.isfile(config_location):
            print(f"     Config: {os.path.abspath(config_location)} ")
        else:
            print(f"     Config: {os.path.abspath('config.ini')} ")
        if loaded_with_argv is False:
            print(
                f"     (Tip: Log in directly by running 'instabot-py {askusername}')'"
            )
    else:
        if "yes" in ask_question(
                "Could not find user in settings. Would you like to add now? (yes/no): "
        ):
            setupinteractive(config, config_location)
        else:
            exit()

    print("\n     ______Starting bot_____")

    configdict = dict(config.items(askusername))

    for _setting, _value in configdict.items():

        try:
            if "{" in _value or "[" in _value:
                json.loads(_value)
                configdict[_setting] = json.loads(_value)
            else:
                raise ValueError
        except ValueError:
            if _value.isdigit() is True:
                configdict[_setting] = int(_value)
            if _value.lower == "true":
                configdict[_setting] = True
            if _value.lower == "false":
                configdict[_setting] = False
            if _value.lower == "none":
                configdict[_setting] = None
            pass

    configdict["login"] = configdict.pop("username")

    bot = InstaBot(**configdict)
    while True:
        bot.new_auto_mod()
Esempio n. 28
0
bot = InstaBot(
    login=os.environ.get('INSTA_USER', ''),
    password=os.environ.get('INSTA_PASSWORD', ''),
    start_at_h=10,
    start_at_m=0,
    end_at_h=20,
    end_at_m=0,
    like_per_day=500,
    comments_per_day=50,
    tag_list=[
        'l:212999109',  #Los Angeles
        'l:6889842',  #Paris
        'l:219370504',  #Algers
        'l:213326726',  #Warsaw
        'l:213385402',  #London
        # 'change', 'lavieestbelle', 'doglover', 'tweegram', 'nature', 'cool', 'cat', 'cutie', 'onedirection', 'black',
        # 'igparis', 'igersparis', 'fuckology', 'red', 'music', 'inspiration', 'dogsofinstagram', 'bestoftheday',
        # 'white', 'goodmorning', 'instagramhub', 'school', 'green', 'nofilter', 'iphonesia', 'petsagram',
        # 'celibataire', 'doglovers', 'girl', 'pretty', 'travel', 'halloween', 'bored', 'adorable', 'precious',
        # 'motivationalquotes', 'equipedefrance', 'clouds', 'puppies', 'ilovedog', 'hair', 'summer', 'blue',
        # 'awesome', 'petstagram', 'night', 'versagram', 'dogoftheday', 'quotestoliveby', 'picpets', 'instagramers',
        # 'party', 'animals', 'yum', 'dogs', 'igers', 'iphoneonly', 'positivevibes', 'lyon', 'amazing', 'photo',
        # 'cute', 'love', 'puppy', 'parisienne', 'pet', 'parisien', 'food', 'bleublancrouge', 'sweet', 'lifequotes',
        # 'comment', 'girls', 'repost', 'fuckologyquotes', 'animal', 'parisjetaime', 'family', 'naturephotography',
        # 'morningmotivation', 'goodvibes', 'quote', 'igdaily', 'ilovemydog', 'morningvibes', 'quoteoftheday',
        # 'lol', 'word', 'friends', 'bestfriend', 'beautiful', 'igaddict', 'instadaily', 'pets', 'indiea',
        # 'instamood', 'sun', 'swag', 'life', 'mornings', 'instagood', 'allezlesbleus', 'throwbackthursday',
        # 'sunrise', 'me', 'parismonamour', 'poetry', 'funny', 'instagramdogs', 'harrystyles', 'baby', 'happy',
        # 'igfrance', 'all_shots', 'fashion', 'ilovedogs', 'ig', 'follow', 'bordeaux', 'smile', 'tagblender',
        # 'creativity', 'allezlesbleues', 'lifestyle', 'sunset', 'photooftheday', 'followback', 'photography',
        # 'pink', 'inspirationalquotes', 'instahub', 'jj', 'picstitch', 'like', 'dog', 'comments', 'followme',
        # 'doggy', 'instalove', 'eyes', 'motivation', 'impatience', 'hot', 'picoftheday', 'tail', 'tea', 'my',
        # 'yummy', 'fucklove', 'fitfrenchies', 'tbt', 'instago', 'naturel', 'quotes', 'morning', 'beach', 'art',
        # 'jj_forum', 'paris', 'sky', 'pup', 'dogstagram', 'fun', 'bhfyp',
    ],
    tag_blacklist=[],
    user_blacklist={},
    max_like_for_one_tag=100,
    follow_per_day=0,  #follow_per_day = 500
    follow_time=0,  #follow_time=1 * 60 * 60,
    unfollow_per_day=0,  #unfollow_per_day=300
    unfollow_break_min=0,  #unfollow_break_min=15 * 60,
    unfollow_break_max=0,  #unfollow_break_max=30 * 60
    log_mod=0,
    proxy='',
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[['👆', '👌', '💪'], ['😎', '😍', '😉'], ['🤙', '👍']],
    # Use unwanted_username_list to block usernames containing a string
    ## Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    ### 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        'second', 'stuff', 'art', 'project', 'love', 'life', 'food', 'blog',
        'free', 'keren', 'photo', 'graphy', 'indo', 'travel', 'art', 'shop',
        'store', 'sex', 'toko', 'jual', 'online', 'murah', 'jam', 'kaos',
        'case', 'baju', 'fashion', 'corp', 'tas', 'butik', 'grosir', 'karpet',
        'sosis', 'salon', 'skin', 'care', 'cloth', 'tech', 'rental', 'kamera',
        'beauty', 'express', 'kredit', 'collection', 'impor', 'preloved',
        'follow', 'follower', 'gain', '.id', '_id', 'bags'
    ],
    unfollow_whitelist=[])
Esempio n. 29
0
def main():
    config = ConfigManager()
    config.set_many(DEFAULT_CONFIG)
    _config = ConfigManager(schema=schema, defaults=defaults)
    config.set_many(_config.as_dict())
    config_file = _config.get('config.file')
    config.set_many(ConfigManager(schema=schema, path=config_file).as_dict())
    config.set_many(_config.as_dict())
    config.commit()

    configure_logging(config)
    if config.get('dump_configuration'):
        conf = config.as_dict()
        conf.pop('config42')
        conf.pop('dump_configuration')
        print(yaml.dump(conf))
        exit(0)

    if config.get('create_configuration'):
        create_configuration()
        exit(0)

    if config.get('show_version'):
        print("Installed version {}".format(instabot_py.__version__))
        exit(0)

    if not config.get('ignore_updates'):
        last_version = get_last_version()
        current_version = instabot_py.__version__
        if last_version and last_version != current_version:
            print(f"""Newer version is available: {last_version}. The current \
version is: {current_version}.
To update instabot-py, please perform: 
    python3 -m pip install instabot-py --upgrade --no-cache-dir
                
    > You can also ignore this warning and upgrade instabot-py later. In this \
case, please run the instabot with '--ignore-updates' flag.""")
            exit(0)

    if config_file:
        print(f"Reading configuration ({len(_config.as_dict())} settings) from"
              f" {config_file}")
    elif os.path.isfile('instabot.config.yml'):
        print("Using 'instabot.config.yml' as a configuration, add "
              "'-c your-config.yml' if you want to use your config file")
    else:
        print("Configuration file has not been found. Please run the instabot "
              "with '--create-config' flag.")
        exit(0)

    try:
        bot = InstaBot(config=config)
    except CredsMissing:
        print(
            """We could not find your Instagram login and/or password. Maybe \
you did not change the default ones in the config file.
You can specify them either directly, correct them in the default config file \
or use your own config file:

    instabot-py --login YOUR_LOGIN --password YOUR_PASSWORD    
or
    instabot-py -c your-config.yml
""")
        exit(1)

    bot.mainloop()
Esempio n. 30
0
bot = InstaBot(
    login="******",  # Enter username (lowercase). Do not enter email!
    password="******",
    like_per_day=1000,
    comments_per_day=1000,
    tag_list=[
        "repost", "follow4follow", "f4f", "cute", "l:212999109", "blonde",
        "model", "chat", "fun", "entertainment", "hot"
    ],
    tag_blacklist=["rain", "thunderstorm"],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=1000,
    follow_time=1 * 60 * 60,
    unfollow_per_day=700,
    unlike_per_day=0,
    unfollow_recent_feed=True,
    # If True, the bot will also unfollow people who dont follow you using the recent feed. Default: True
    time_till_unlike=3 * 24 * 60 * 60,  # 3 days
    unfollow_break_min=15,
    unfollow_break_max=30,
    user_max_follow=0,
    # session_file=False, # Set to False to disable persistent session, or specify custom session_file (ie ='myusername.session')
    user_min_follow=0,
    log_mod=0,
    proxy="",
    # List of list of words, each of which will be used to generate comment
    # For example: "This shot feels wow!"
    comment_list=[
        ["this", "the", "your"],
        ["photo", "picture", "pic", "shot"],
        ["is", "looks", "is 👉", "is really"],
        [
            "great",
            "super",
            "good",
            "very good",
            "good",
            "wow",
            "WOW",
            "cool",
            "GREAT",
            "magnificent",
            "magical",
            "very cool",
            "stylish",
            "beautiful",
            "so beautiful",
            "so stylish",
            "so professional",
            "lovely",
            "so lovely",
            "very lovely",
            "glorious",
            "so glorious",
            "very glorious",
            "adorable",
            "excellent",
            "amazing",
        ],
        [".", "🙌", "... 👏", "!", "! 😍", "😎"],
        [
            "visit https://alexanikolayevna.co",
            "check us out https://alexanikolayevna.co",
            "support us at https://alexanikolayevna.co"
        ],
    ],
    # Use unwanted_username_list to block usernames containing a string
    # Will do partial matches; i.e. 'mozart' will block 'legend_mozart'
    # 'free_followers' will be blocked because it contains 'free'
    unwanted_username_list=[
        "second",
        "stuff",
        "art",
        "project",
        "love",
        "life",
        "food",
        "blog",
        "free",
        "keren",
        "photo",
        "graphy",
        "indo",
        "travel",
        "art",
        "store",
        "toko",
        "jual",
        "online",
        "murah",
        "jam",
        "kaos",
        "case",
        "baju",
        "fashion",
        "corp",
        "tas",
        "butik",
        "grosir",
        "karpet",
        "sosis",
        "salon",
        "skin",
        "care",
        "cloth",
        "tech",
        "rental",
        "kamera",
        "beauty",
        "express",
        "kredit",
        "collection",
        "impor",
        "preloved",
        "follow",
        "follower",
        "gain",
        ".id",
        "_id",
        "bags",
    ],
    unfollow_whitelist=["example_user_1", "example_user_2"],
    # Enable the following to schedule the bot. Uses 24H
    end_at_h=23,  # Hour you want the bot to stop
    end_at_m=30,  # Minute you want the bot stop, in this example 23:30
    start_at_h=11,  # Hour you want the bot to start
    start_at_m=
    53,  # Minute you want the bot to start, in this example 9:10 (am).
)