def main(): parser = argparse.ArgumentParser(description='Give me your IG account') parser.add_argument('LOGIN', help='Your IG login') parser.add_argument('PASSWORD', help='Your IG password') args = parser.parse_args() bot = Bot() bot.login(username=args.LOGIN, password=args.PASSWORD) timeout = 10 * 60 pics = glob.glob('images\\*') for pic in pics: bot.upload_photo(pic, caption='space') time.sleep(timeout)
from instabot import bot import os bot = bot.Bot() scriptDir = os.path.dirname(os.path.realpath(__file__)) bot.login(username="******", password="******") bot.upload_photo(scriptDir + os.path.sep + "patternjpg.jpg", caption="deneme4")
def upload(self): bot.login(username=USER, password=PASSWD) CaptionToPost = self.cap.get('1.0', 'end-1c') bot.upload_photo(fileToPost, caption=CaptionToPost)
from instabot import bot bot = Bot() bot.login(username="******", password="******") '''Poner foto que se va a subir en el mismo directorio donde se encuenta el .py''' # bot.upload_photo('''nombre de la foto entre las comillas''' "FOTO", caption = "Descripción debajo de la foto")
#Imports sucessfully from instabot import bot import os #configuring vars USER = os.environ.get('USERNAME') PASSWARD = os.environ.get('PASSWARD') MESSAGE = os.environ.get('MESSAGE') #running of the bot bot.login(USER, PASSWARD) #login by user print('login sucessfull') #sucess message bot.follwers_list(USER) #getting followers list users = bot.users #asignning users to a value for user in users: #loop bot.message(user, MESSAGE) #messaging to user in users print('Message send to ' + user + ' sucessfully!') #sucess msg