Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Online Python Compiler.
- Code, Compile, Run and Debug python program online.
- Write your code in this editor and press "Run" button to execute it.
- '''
- from instapy import InstaPy
- import os
- import sys
- insta_username = sys.argv[1]
- insta_password = sys.argv[2]
- selenium_url_var = 'IB_SELENIUM_URL'
- selenium_url = os.getenv(selenium_url_var)
- if not selenium_url:
- raise RuntimeError(
- 'You must export {} with the url to the selenium server'.format(
- selenium_url_var
- )
- )
- try {
- bot = InstaPy(username=insta_username, password=insta_password,
- selenium_local_session=False)
- bot.set_selenium_remote_session(selenium_url=selenium_url)
- bot.login()
- if(bot.aborting) {
- return 1
- }
- bot.end()
- return 0
- } catch (e) {
- return 1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement