Exemple #1
0
 def __init__ (self,
               tags= ("default"), 
               max_stack_size= 5,
               average_time_gap= 30,
               follow_ratio= 1,
               like_ratio= 1,
               comment_ratio= .33,
               follow_duration= 300,
               comments= (("Super", "Beautiful", "Great"), ("post", "picture"), ("!", "")),
               add_to_unfollow_queue= True,
               media_owner_max_followers= 500,
               media_max_likes= 20,
               users_blacklist= ("user0",),
               users_whitelist= ("user1",),
               medias_posted_before_time= 300,
               allow_videos= False,
               start_at= dtime(hour= 10, minute= 30),
               end_at= dtime(hour= 20),
              ):
     InstaBot.__init__(self)
     [setattr(self, name, value) for name, value in locals().items() if name != "self"]
     self.kill_now = False
     self._ConnectionResetErrors = 0
     signal(SIGINT, self.stop)
     signal(SIGTERM, self.stop)
 def instabot(self) -> None:
     """Run the Instagram Bot"""
     clear_terminal()
     self.__display_title('Instagram Bot')
     username, password = self.prompt_credentials()
     bot = InstaBot(username, password)
     topics = bot.prompt_for_topics()
     bot.login()
     bot.like_photos(topics)
     bot.quit()
Exemple #3
0
def test():
    bot = InstaBot(
        login=os.environ.get('username', None),
        password=os.environ.get('password', None),
        like_per_day=1400,
        comments_per_day=300,
        tag_list=[
            'primerolacomunidad', 'neverstopexploring', 'passionpassport',
            'guardiantravelsnaps', 'guardiancities', 'cnntravel', 'bbctravel',
            'folkmagazine', 'livefolk', 'liveauthentic', 'visualoflife',
            'travelstoke', 'wanderlust', 'mkexplore', 'letsgosomewhere',
            'agameoftones', 'hallazgosemanal', 'artofvisuals'
            'Zacatecas', 'México', 'España', 'España', 'Espanya', 'cataluña',
            'catalunya', 'Terrassa', 'follow4follow', 'f4f', 'ilovepiques',
            'MoodyPorts', 'MP_kingy_kings', 'artofvisuals', 'aov',
            'bevisuallyinspired', 'zeiss', 'vscocam', 'justgoshoot',
            'artofvisuals', 'CreateExploreTakeover', 'visualsgang',
            'igworldclub', 'special_shots', 'artofvisuals', 'igphotoworld',
            'shotaward', 'ig_worldclub', 'instagoodmyphoto', 'createcommune'
        ],
        tag_blacklist=[],
        user_blacklist={
            # 'cube.miami': '', 'josep_batet': '', 'avq_68': '', 'rcaneter': '',
            # 'sergitugas': '', 'focvl_point': ''
        },
        max_like_for_one_tag=30,
        follow_per_day=0,
        follow_time=4 * 60 * 60,
        unfollow_per_day=0,
        unfollow_break_min=15,
        unfollow_break_max=30,
        log_mod=0,
        proxy='',
        # Use unwanted username list to block users which have username contains one of this string
        # Doesn't have to match entirely example: mozart will be blocked because it contains *art
        # freefollowers will be blocked because it contains free
        unwanted_username_list=[
            'second', 'stuff', 'art', 'project', 'love', 'life', 'food',
            'blog', 'free', 'keren', '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'
        ])

    try:
        bot.new_auto_mod()
    except Exception:
        test()
Exemple #4
0
    def __init__(self, user_name='', password=''):
        # options
        self.start_time = datetime.datetime.now()
        self.user_name = user_name
        self.user_key = password
        self.my_profile = None

        # attempt login
        self.bot = InstaBot(login=self.user_name,
                            password=self.user_key,
                            log_mod=0)
        if self.bot.login_status != True:
            print('Login failed')
            self.die()

        # stats
        self.likes = []
Exemple #5
0
def login_with_session(bot: InstaBot):
    if bot.session_file and os.path.isfile(bot.session_file):
        bot.logger.info(f"Found session file {bot.session_file}")
        with open(bot.session_file, "rb") as i:
            cookies = pickle.load(i)
            bot.s.cookies.update(cookies)
            bot.user_login = cookies.__user_name
            return __verifyLogin(bot)
    return False
Exemple #6
0
def main():
    bot = InstaBot.load_config()
    if not (getattr(bot, "login") and getattr(bot, "password")):
        return print(
            'You must inform your login and password in the config file')
    if getattr(bot, "unfollow"):
        bot.unfollow_profiles()
    else:
        bot.start()
Exemple #7
0
def __verifyLogin(bot: InstaBot):
    r = bot.s.get("https://www.instagram.com/")
    bot.csrftoken = re.search('(?<="csrf_token":")\w+', r.text).group(0)
    bot.s.cookies["csrftoken"] = bot.csrftoken
    bot.s.headers.update({"X-CSRFToken": bot.csrftoken})
    finder = r.text.find(bot.user_login)
    if finder != -1:
        bot.user_id = bot.get_user_id_by_username(bot.user_login)
        bot.login_status = True
        bot.logger.info(f"{bot.user_login} login success!\n")
        if bot.session_file is not None:
            bot.logger.info(
                f"Saving cookies to session file {bot.session_file}")
            with open(bot.session_file, "wb") as output:
                bot.s.cookies.__user_name = bot.user_login
                pickle.dump(bot.s.cookies, output, pickle.HIGHEST_PROTOCOL)
        return True
    else:
        bot.login_status = False
        bot.logger.error("Login error! Check your login data!")
        if bot.session_file and os.path.isfile(bot.session_file):
            try:
                os.remove(bot.session_file)
            except:
                bot.logger.info(
                    "Could not delete session file. Please delete manually")

        bot.prog_run = False
        return False
Exemple #8
0
 def run(self):
     try:
         bot = InstaBot(
             login=self.login,
             password=self.password,
             like_per_day=1000,
             comments_per_day=200,
             tag_list=['natal', 'riograndedonorte', 'praia', 'pontanegra', 'pirangi'],
             max_like_for_one_tag=200,
             follow_per_day=300,
             follow_time=5*60*60,
             unfollow_per_day=50,
             unfollow_break_min=15,
             unfollow_break_max=30,
             log_mod=0,
             proxy='',
             comment_list=[["Que"],
                           ["legal!", "maravilha!", "coisa bela!"],
                           ["Top!!!"]])
         while True:
             bot.new_auto_mod()
     except Exception as e:
         print(e)
Exemple #9
0
    def __init__(self, link):
        """
        :param link: link to the sorteio
        :type link: string

        """
        # Get instagram account
        self.account = InstaBot()
        # Saving the sorteio link
        self.link = link
        # Used usernames:
        self.used = []
        # Comments per hour
        self.comments_per_hour = 60
        # Seconds per comment
        self.seconds_per_comment = int(60 * 60 / self.comments_per_hour)
Exemple #10
0
def bot(tmp_path, cwd):
    from instabot 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")
                    })
Exemple #11
0
import time
import random
sys.path.append(os.path.join(sys.path[0], 'src'))

from check_status import check_status
from feed_scanner import feed_scanner
from follow_protocol import follow_protocol
from instabot import InstaBot
from unfollow_protocol import unfollow_protocol
from userinfo import UserInfo

with open("login.txt") as file:
    logg = [row.strip() for row in file]
bot = InstaBot(
    login=logg[0],
    password=logg[1],


    )

with open("fl.txt") as file:
    us = [row.strip() for row in file]
print(us)


ui = UserInfo() 
for x in us:
    try:
        rand =random.randint(45, 60)
        print('time rand:===='+ str(rand))
        ss=ui.get_user_id_by_login(x)
        print(ss)
Exemple #12
0
bot = InstaBot(
    login="******",
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=['follow4follow', 'f4f', 'cute'],
    tag_blacklist=['rain', 'thunderstorm'],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60,
    unfollow_per_day=300,
    unfollow_break_min=15,
    unfollow_break_max=30,
    log_mod=0,
    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', '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'])
while True:
Exemple #13
0
bot = InstaBot(
    login="******",
    password="",
    like_per_day=750,
    comments_per_day=50,
    tag_list=["philosophy", "lifemotivation", "stoic", "motivational", "stoicism",
    "lifestyle", "healthylifestyle", "gymmotivation",
    "fitlife",  "socrate", "philosopher", "thinker"],
    tag_blacklist=[],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=250,
    follow_time=30 * 60,
    unfollow_per_day=200,
    unfollow_break_min=0,
    unfollow_break_max=1,
    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", "that"],
                  ["photo", "shot", "post"],
                  ["is", "looks", "feels",],
                  ["great", "super", "wow",
                   "WOW", "cool", "GREAT", "magnificent",
                   "very cool", "stylish", "insane",
                   "so stylish", "insane", "glorious","so glorious"
                   ,"excellent", "amazing"],
                  [". Keep up the good workd! #stoicphysique", "!! Check out my new page. Thx! #stoicphysique", "! Looking forward for more! #stoicphysique"]],
    # 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=[])
Exemple #14
0
def main():
    print(__doc__)
    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.__version__))
        exit(0)

    if not config.get('ignore_updates'):
        last_version = get_last_version()
        if last_version and last_version != instabot.__version__:
            print(
                "Newer version available: {}, The current version: {}".format(
                    last_version, instabot.__version__))
            print(
                "To update, please type \n python3 -m pip install neo-instabot --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("   neo-instabot --login YOUR_LOGIN --password YOUR_PASSWORD")
        print("   neo-instabot -c your-config.yml")
        print(
            "You can export and modify the default configuration by typing the command below"
        )
        print("    neo-instabot --dump")
        exit(1)
    bot.run()
Exemple #15
0
from instabot import InstaBot

bot = InstaBot(login="******",
               password="******",
               like_per_day=1000,
               max_like_for_one_tag=5,
               follow_per_day=150,
               follow_time=5 * 60 * 60,
               unfollow_per_day=150,
               comments_per_day=50,
               tag_list=['girl', 'car', 'cat'],
               log_mod=0)

bot.new_auto_mod()
Exemple #16
0
bot = InstaBot(
    login="******",
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=['follow4follow', 'f4f', 'cute'],
    tag_blacklist=['rain', 'thunderstorm'],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60,
    unfollow_per_day=300,
    unfollow_break_min=15,
    unfollow_break_max=30,
    log_mod=0,
    proxy='',
    # Use unwanted username list to block users which have username contains one of this string
    ## Doesn't have to match entirely example: mozart will be blocked because it contains *art
    ### freefollowers 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'
    ],
    bot_running_hour_start=0,
    bot_running_hour_end=23
    #Change these to whatever hours you like
    ##The bot will only run during these hours and sleep
    ### HOURS BETWEEN 0-24 ONLY!!!!!!!!!!!!!!!!
    #### EXAMPLE 1
    #####bot_running_hour_start = 5,
    #####bot_running_hour_end = 16
    #### EXAMPLE 2
    #####bot_running_hour_start = 22,
    #####bot_running_hour_end = 4
    #### BOTH OF THESE ARE VALID HOURS AND WORK!
)
Exemple #17
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from instabot import InstaBot

bot = InstaBot(login="******",
               password="******",
               like_per_day=1000,
               comments_per_day=0,
               tag_list=['follow4follow', 'f4f', 'cute'],
               tag_blacklist=['rain', 'thunderstorm'],
               user_blacklist={
                   'hellokitty': '',
                   'hellokitty3': ''
               },
               max_like_for_one_tag=50,
               follow_per_day=150,
               follow_time=5 * 60 * 60,
               unfollow_per_day=150,
               unfollow_break_min=15,
               unfollow_break_max=30,
               log_mod=0)

bot.new_auto_mod()
Exemple #18
0
from instabot import InstaBot
from unfollow_protocol import unfollow_protocol

bot = InstaBot(
    login="******",
    password="******",
    like_per_day=500,
    comments_per_day=0,
    tag_list=[
        'follow', 'follow4follow', 'sys', 'f4f', 'follow4follow', 'amigos',
        'friends', 'fun'
    ],
    location_id_list=[''],
    tag_blacklist=['', ''],
    user_blacklist={},
    max_like_for_one_source=50,
    follow_per_day=300,
    follow_time=1 * 60,
    unfollow_per_day=0,
    unfollow_break_min=15,
    unfollow_break_max=30,
    log_mod=0,
    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=['sexy', 'shop', 'sex', 'free', 'gratis'],
    unfollow_whitelist=[''])
while True:

    #print("# MODE 0 = ORIGINAL MODE BY LEVPASHA")
Exemple #19
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from instabot import InstaBot

bot = InstaBot(login="******",
               password="******",
               like_per_day=1000,
               comments_per_day=0,
               tag_list=['marketing', 'herbalifenutricion'],
               max_like_for_one_tag=50,
               follow_per_day=150,
               follow_time=5 * 60 * 60,
               unfollow_per_day=150,
               unfollow_break_min=15,
               unfollow_break_max=30,
               log_mod=0)
'''
# if we want to set some particular words for a tag in particular         
comment_for_tags = {}
comment_for_tags["car"] = ["this", "the"],["car", "vehicle", "motorcar", "automobile"],["is", "looks", "feels", "is really"],["great", "super", "good", "very good", "awesome", "incredible", "amazing"]
bot.set_tag_comment_values(comment_for_tags)    
'''

bot.new_auto_mod()
Exemple #20
0
bot = InstaBot(
    login=local_data.USERNAME,
    password=local_data.PASSWORD,
    like_per_day=600,
    media_max_like=50,
    media_min_like=2,
    follow_per_day=0,
    follow_time=5 * 60 * 60,
    unfollow_per_day=0,
    comment_list=[
        ["this", "the", "your", '', 'This', 'The', 'Your'],
        ["photo", "picture", "pic", "shot", "snapshot", 'image', 'img'],
        ["is", "looks", 'looks really', 'feels really', "feels", "is really"],
        [
            "great",
            "GREAT",
            "super",
            "good",
            "very good",
            'so good',
            "wow",
            "WOW",
            "cool",
            "very cool",
            'so cool',
            "magnificent",
            'very magnificent',
            "magical",
            "stylish",
            "so stylish",
            "beautiful",
            "so beautiful",
            'very beautiful',
            "so professional",
            'very professional',
            "lovely",
            "so lovely",
            "very lovely",
            "glorious",
            "so glorious",
            "very glorious",
            "adorable",
            'so adorable',
            'very adorable',
            "excellent",
            "amazing",
            'so amazing',
            'very amazing',
            'awesome',
            'so awesome',
            'very awesome',
            'nice',
        ], [".", "..", "...", "!", "!!", "!!!", '!!!!', ')', '))', ')))', ''],
        [
            '', ':-)', ':-D', ';-)', '😀', '😁', '😂', '😃', '😄', '😅', '😆', '😉',
            '😊', '😎', '☺', '🙂', '😏', '🤠', '😺', '😸', '🤘', '👌', '👍'
        ]
    ],
    comments_per_day=300,
    tag_list=[
        'draw', 'morn', 'red', 'jacket', 'webstagram', 'yellow', 'company',
        'heels', 'glam', 'instacolor', 'model', 'illustration', 'instago',
        'orange', 'pop', 'bored', 'pink', 'night', 'dayjob', 'colorgram',
        'gettingready', 'vibrant', 'electronic', 'nature', 'computer', 'geek',
        'sketch', 'screen', 'look', 'selfietime', 'graphics', 'multicolored',
        'goodtimes', 'white', 'forever', 'dress', 'earlybird', 'selfienation',
        'dog', 'instagramers', 'awesome', 'ilovemyjob', 'art', 'colorful',
        'face', 'hair', 'girl', 'colores', 'goodmorning', 'besties', 'jewelry',
        'wake', 'rap', 'gallery', 'artsy', 'selfie', 'pants', 'morning',
        'colour', 'nails', 'shopping', 'jam', 'swag', 'water', 'polo', 'swagg',
        'selfies', 'hot', 'textgram', 'workinglate', 'bestsong', 'funny',
        'instamorning', 'styles', 'blue', 'amazing', 'technology', 'beautiful',
        'smile', 'picture', 'job', 'green', 'man', 'sleepy', 'sunrise',
        'ready', 'live', 'flower', 'my', 'friendship', 'follow', 'party',
        'day', 'shoes', 'instahub', 'girly', 'remix', 'colors', 'goingout',
        'cute', 'song', 'artoftheday', 'fun', 'handsome', 'life',
        'rainbowcolors', 'sunshine', 'artist', 'yum', 'tshirt', 'iphoneonly',
        'refreshed', 'business', 'friend', 'me', 'awake', 'gadgets',
        'bestfriends', 'instaselfie', 'device', 'instafollow', 'purse',
        'shirt', 'portrait', 'cool', 'hiphop', 'nerd', 'clouds', 'iphonesia',
        'electronics', 'stylish', 'laptops', 'girls', 'instafashion', 'love',
        'instadaily', 'rnb', 'wakingup', 'family', 'instatech', 'jeans',
        'genre', 'lovethem', 'masterpiece', 'daytime', 'bestoftheday',
        'bestfriend', 'food', 'rainbow', 'work', 'paper', 'goodmusic',
        'newsong', 'onedirection', 'pretty', 'wakeup', 'skirt', 'instacool',
        'instaartist', 'melody', 'breakfast', 'tired', 'hack', 'chill',
        'color', 'early', 'goodfriends', 'beach', 'harrystyles', 'picoftheday',
        'computers', 'pencil', 'sky', 'techie', 'bed', 'pen', 'dope',
        'niallhoran', 'drawing', 'myjob', 'like4like', 'myjam', 'fresh',
        'snooze', 'outfit', 'favoritesong', 'sneakers', 'indigo', 'tweegram',
        'goodtime', 'multicolor', 'violet', 'instagood', 'eyes', 'instaart',
        'music', 'beats', 'instamusic', 'creative', 'style', 'all_shots',
        'sunset', 'office', 'techy', 'best', 'instajob', 'friends',
        'listentothis', 'gadget', 'instalike', 'bumpin', 'repeat',
        'sketchbook', 'throwbackthursday', 'working', 'memories', 'swagger',
        'black', 'design', 'partymusic', 'colorworld', 'mygrind', 'photo',
        'instamood', 'graphic', 'tech', 'fashion', 'beauty', 'instacolorful',
        'instalife', 'lovethissong', 'happy', 'photooftheday', 'songs',
        'instalove', 'beat', 'lol'
    ],
    max_like_for_one_tag=5,
    unfollow_break_min=15,
    unfollow_break_max=30,
    log_mod=0,
    proxy="",
    user_blacklist={},
    tag_blacklist=[],
    unwanted_username_list=[],
    unfollow_whitelist=[])
# The limit for liking is equal to 1000, for following is 300 and for comments is 50. Else IG could ban the account specified
## The tags must be splitted since all of them come in a single String
### Uses ternary operator to enable or disable feature based on boolean labels
bot = InstaBot(
    login=sys.argv[1],
    password=sys.argv[2],
    like_per_day=likes_day,
    comments_per_day=comments_day,
    tag_list=((sys.argv[3]).split(",") if sys.argv[3] != '' else [
        'love', 'instagood', 'photooftheday', 'beautiful', 'tbt', 'happy',
        'cute', 'fashion', 'followme', 'me', 'follow', 'like4like',
        'picoftheday', 'selfie', 'summer'
    ]),
    tag_blacklist=(sys.argv[7]).split(","),
    user_blacklist=user_dict,
    max_like_for_one_tag=50,
    follow_per_day=follows_day,
    follow_time=1 * 60,
    unfollow_per_day=(150 if sys.argv[10] == "true" else 0),
    unfollow_break_min=(15 if sys.argv[10] == "true" else 0),
    unfollow_break_max=(30 if sys.argv[10] == "true" else 0),
    log_mod=1,  # write log to file ALWAYS
    proxy='',
    # Use unwanted username list to block users which have username contains one of this string
    ## Doesn't have to match entirely example: mozart will be blocked because it contains *art
    ### freefollowers will be blocked because it contains free
    unwanted_username_list=(sys.argv[9]).split(","),
    unfollow_whitelist=['example_user_1', 'example_user_2'])

end_time = json.loads(
    json.dumps(
followerslist = []

#get following id
for item in following:
    newlist.append(item['id'])

#get followers id
for item in followers:
    followerslist.append(item['id'])

#create final list with followers
endlist = set.difference(set(newlist), set(favorites), set(followerslist))

#create final list without followers
'''
endlist = set.difference(set(newlist), set(favorites))
'''

#use instabot
bot = InstaBot('login', 'password')

print('Number of unnecessary subscriptions:', len(endlist), '\n')

for items in endlist:
    rnd = random.randint(1, 16)
    bot.unfollow(items)
    print('Wait', 30 + rnd, 'sec')
    time.sleep(30 + rnd)

print('All done.')
Exemple #23
0
sys.path.append(os.path.join(sys.path[0], 'src'))

from check_status import check_status
from feed_scanner import feed_scanner
from follow_protocol import follow_protocol
from instabot import InstaBot
from unfollow_protocol import unfollow_protocol
with open("text.txt") as file:
    mitag = [row.strip() for row in file]
bot = InstaBot(
    login="******",
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=mitag,
    max_like_for_one_tag=50,
    follow_per_day=1000,
    follow_time=1 * 60,
    unfollow_per_day=1000,
    unfollow_break_min=15,
    unfollow_break_max=30,
    log_mod=0,
    proxy='',)

while True:

    #print("# MODE 0 = ORIGINAL MODE BY LEVPASHA")
    #print("## MODE 1 = MODIFIED MODE BY KEMONG")
    #print("### MODE 2 = ORIGINAL MODE + UNFOLLOW WHO DON'T FOLLOW BACK")
    #print("#### MODE 3 = MODIFIED MODE : UNFOLLOW USERS WHO DON'T FOLLOW YOU BASED ON RECENT FEED")
    #print("##### MODE 4 = MODIFIED MODE : FOLLOW USERS BASED ON RECENT FEED ONLY")
    #print("###### MODE 5 = MODIFIED MODE : JUST UNFOLLOW EVERYBODY, EITHER YOUR FOLLOWER OR NOT")
Exemple #24
0
from instabot import InstaBot

bot = InstaBot(driver_path='chromedriver.exe')

while True:
    username = input("Enter username : ")
    dp_url = bot.getDpURL(username)
    if dp_url != 'err':
        bot.download_img(dp_url, username + '.jpg')
Exemple #25
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from instabot import InstaBot

bot = InstaBot(login="******", password="******",
               like_per_day=1800, # How many likes set bot in one day.
               comments_per_day=0,
	          tag_list=['rap','hiphop','music','underground','fresh','hot','trap','musicfestival','musician','musicb  
ox','musicvideos','recordingartist','rimasebatidas','2pac','Tupac','187combo','lisbon','vibes','raw',  
'hiphopculture','soundcloud','independent',  
'paris','tokyo','amsterdam','japan','selfie','california','newyork', 'musicproduction',  
'spotify','spotifypremium','concert','liveshow', 'liveperformance', 'musicianlife', 'musicians',  
'musiclife',  
'musiclovers','bass','scary','fire','gangstarap','sounds','label','musicproducer','dj','rockstar','rapst  
ar','singer','singersongwriter','cover','portugal','vocals',  
'playlist','songs','gig','liveshow','spotifyplaylist','edm','lisbon'],
               max_like_for_one_tag=5, # maximum likes on one tag in a row
               media_max_like=5, # Don't like if media have more than n likes.
               media_min_like=0, # Don't like if media have less than n likes.
               follow_per_day=150,
               follow_time=12*60*60, # how long in seconds we are going to follow them for
               unfollow_per_day=130,
               unfollow_break_min=15, # Minimum seconds for unfollow break pause
               unfollow_break_max=30, # Maximum seconds for unfollow break pause
               log_mod=0) # log_mod = 0 log to console, log_mod = 1 log to file, log_mod = 2 no log

bot.new_auto_mod()
Exemple #26
0
bot = InstaBot(
    login="******",
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=['follow4follow', 'f4f', 'cute'],
    tag_blacklist=['rain', 'thunderstorm'],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60,
    unfollow_per_day=300,
    unfollow_break_min=15,
    unfollow_break_max=30,
    log_mod=0,
    proxy='',
    # Use unwanted username list to block users which have username contains one of this string
    # Doesn't have to match entirely example: mozart will be blocked because it contains *art
    # freefollowers 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'])
while True:
Exemple #27
0
from check_status import check_status
from feed_scanner import feed_scanner
from follow_protocol import follow_protocol
from instabot import InstaBot
from unfollow_protocol import unfollow_protocol
with open("text.txt") as file:
    mitag = [row.strip() for row in file]
bot = InstaBot(
    login="******",
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=mitag,
    max_like_for_one_tag=50,
    follow_per_day=1000,
    follow_time=1 * 60,
    unfollow_per_day=1000,
    unfollow_break_min=15,
    unfollow_break_max=30,
    log_mod=0,
    proxy='',
)

while True:

    #print("# MODE 0 = ORIGINAL MODE BY LEVPASHA")
    #print("## MODE 1 = MODIFIED MODE BY KEMONG")
    #print("### MODE 2 = ORIGINAL MODE + UNFOLLOW WHO DON'T FOLLOW BACK")
    #print("#### MODE 3 = MODIFIED MODE : UNFOLLOW USERS WHO DON'T FOLLOW YOU BASED ON RECENT FEED")
    #print("##### MODE 4 = MODIFIED MODE : FOLLOW USERS BASED ON RECENT FEED ONLY")
Exemple #28
0
from instabot import InstaBot
from utils import queryDB, insertDB
import time
import datetime

bot = InstaBot('TEST')
bot.login()
counter = 0

f = open("log.txt", "a")

while 1:
    counter += 1
    now = datetime.datetime.now()
    print('novi ciklus '+str(now))
    
    picLiked = bot.run(('mediterraneanfood', 'food', 'instafoodie'), 50)
    f.write(str(now)+' cycle no.'+str(counter)+', pics liked: '+str(picLiked)+'\n')
    print(str(now)+' cycle no.'+str(counter)+', pics liked: '+str(picLiked))
    time.sleep(20)
Exemple #29
0
from follow_protocol import follow_protocol
from instabot import InstaBot
from unfollow_protocol import unfollow_protocol

bot = InstaBot(
    login="******",
    password="******",
    like_per_day=300,
    comments_per_day=0,
    tag_list=[
        'follow', 'like4like', 'f4f', 'cute', 'summer', 'sexy', 'squat',
        'fitness', 'gym', 'boy', 'friends', 'nyc', 'eeuu', 'usa'
    ],
    tag_blacklist=[],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=400,
    follow_time=5 * 60 * 60,
    unfollow_per_day=400,
    unfollow_break_min=15,
    unfollow_break_max=30,
    log_mod=0,
    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=[],
    unfollow_whitelist=[])
while True:

    #print("# MODE 0 = ORIGINAL MODE BY LEVPASHA")
    #print("## MODE 1 = MODIFIED MODE BY KEMONG")
Exemple #30
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from instabot import InstaBot

bot = InstaBot(login="******", password="******",
               like_per_day=1000,
               comments_per_day=0,
               tag_list=['follow4follow', 'lol', 'cute'],
               max_like_for_one_tag=50,
               follow_per_day=150,
               follow_time=5*60*60,
               unfollow_per_day=150,
               unfollow_break_min=15,
               unfollow_break_max=30,
               log_mod=0)

bot.new_auto_mod()
Exemple #31
0
if __name__ == '__main__':
    tags = [
        'travel',
        'igdaily',
        'picoftheday',
        'potd',
        'photooftheday',
        'vsco',
        'vscocam',
        'photography',
        'theta360',
        'dji',
        'mavicpro',
        'snow',
        'snowboarding',
        'porsche',
        'sigsauer',
    ]

    random.seed()
    random.shuffle(tags)

    while True:
        try:
            with closing(InstaBot()) as bot:
                bot.login()
                for tag in tags:
                    usernames = bot.like_tags([tag], num=100)
        except Exception as e:
            logger.error(e)
Exemple #32
0
bot = InstaBot(
    login="******",
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=['follow4follow', 'f4f', 'cute'],
    tag_blacklist=['rain', 'thunderstorm'],
    user_blacklist={},
    max_like_for_one_tag=50,
    follow_per_day=300,
    follow_time=1 * 60,
    unfollow_per_day=300,
    unfollow_break_min=15,
    unfollow_break_max=30,
    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", "snapshot"],
                  ["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"],
                  [".", "..", "...", "!", "!!", "!!!"]],
    # 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'])
Exemple #33
0
bot = InstaBot(
    login="******",
    password="******",
    like_per_day=1000,
    comments_per_day=0,
    tag_list=[
        'humanitario', 'voluntariado', 'apae', 'sejaumvoluntario',
        'trabalhovoluntario', 'graacc'
    ],
    tag_blacklist=[
        'follow4follow', 'likeporlike', 'imoveis', 'venda', 'bomdia',
        'boatarde', 'boanoite', 'deus', 'sextou', 'girl', 'ferias',
        'empresario', 'play', 'drink', 'deputado', 'instamoda', 'moda',
        'style', 'instafashion', 'vintagestyle', 'vintage', 'Casa'
    ],
    user_blacklist={},
    max_like_for_one_tag=10,
    follow_per_day=300,
    follow_time=1 * 60,
    unfollow_per_day=200,
    unfollow_break_min=15,
    unfollow_break_max=30,
    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'])