You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
move instapy_telegram_extension (folder) to InstaPy/extensions
add from extensions.instapy_telegram_extension import InstaPyTelegramExtension
to your config file (config.py / quickstart.py) file.
Usage example
frominstapyimportInstaPyfromextensions.instapy_telegram_extensionimportInstaPyTelegramExtensioninsta_username=''insta_password=''telegam_api=''telegam_user=''# InstaPy login setsession=InstaPy(username=insta_username,password=insta_password,nogui=True)
# Telegram settingstelegram_ext=InstaPyTelegramExtension(telegam_api,telegam_user,session)
# set headless_browser=True if you want to run InstaPy on a servertry:
#Do Loginsession.login()
telegram_ext.sendtext("start");
# settingssession.set_do_follow(enabled=True, percentage=90, times=2)
# actionssession.like_by_tags(['food'], amount=1)
# Telegram End Send Reporttelegram_ext.send_daily_report()
exceptExceptionaserror:
#Print error to telegramtelegram_ext.sendtext('{}: {}'.format("error", error))
finally:
# end the bot sessionsession.end()