{"action":"closed","issue":{"url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2093","repository_url":"https://api.github.com/repos/timgrossmann/InstaPy","labels_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2093/labels{/name}","comments_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2093/comments","events_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2093/events","html_url":"https://github.com/timgrossmann/InstaPy/issues/2093","id":325852528,"node_id":"MDU6SXNzdWUzMjU4NTI1Mjg=","number":2093,"title":"Issues Automating InstaPy with Cron ","user":{"login":"victorsandovalmattar","id":35883449,"node_id":"MDQ6VXNlcjM1ODgzNDQ5","avatar_url":"https://avatars1.githubusercontent.com/u/35883449?v=4","gravatar_id":"","url":"https://api.github.com/users/victorsandovalmattar","html_url":"https://github.com/victorsandovalmattar","followers_url":"https://api.github.com/users/victorsandovalmattar/followers","following_url":"https://api.github.com/users/victorsandovalmattar/following{/other_user}","gists_url":"https://api.github.com/users/victorsandovalmattar/gists{/gist_id}","starred_url":"https://api.github.com/users/victorsandovalmattar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorsandovalmattar/subscriptions","organizations_url":"https://api.github.com/users/victorsandovalmattar/orgs","repos_url":"https://api.github.com/users/victorsandovalmattar/repos","events_url":"https://api.github.com/users/victorsandovalmattar/events{/privacy}","received_events_url":"https://api.github.com/users/victorsandovalmattar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-05-23T20:00:44Z","updated_at":"2018-11-24T15:46:30Z","closed_at":"2018-11-24T15:46:30Z","author_association":"NONE","body":"Hello friends. I am running a script to “Interact with someone else's followers” in a Digital Ocean droplet, and it´s working like a charm. Here follows the script:\r\nimport os\r\nimport time\r\nfrom tempfile import gettempdir\r\n\r\nfrom selenium.common.exceptions import NoSuchElementException\r\n\r\nfrom instapy import InstaPy\r\n\r\ninsta_username = ''\r\ninsta_password = ''\r\n\r\n# set headless_browser=True if you want to run InstaPy on a server\r\n\r\n# set these in instapy/settings.py if you're locating the\r\n# library in the /usr/lib/pythonX.X/ directory:\r\n#   Settings.database_location = '/path/to/instapy.db'\r\n#   Settings.chromedriver_location = '/path/to/chromedriver'\r\n\r\nsession = InstaPy(username=insta_username,\r\n                  password=insta_password,\r\n                  headless_browser=True,\r\n                  multi_logs=True)\r\n\r\ntry:\r\n    session.login()\r\n\r\n    # settings\r\n    session.set_relationship_bounds(enabled=True,\r\n                                 potency_ratio=None,\r\n                                  delimit_by_numbers=True,\r\n                                   max_followers=3000,\r\n                                    max_following=2000,\r\n                                     min_followers=200,\r\n                                      min_following=200)\r\n    session.set_user_interact(amount=2, randomize=False, percentage=100, media='Photo')\r\n    session.set_do_follow(enabled=True, percentage=50)\r\n    session.set_do_like(enabled=True, percentage=100)\r\n    session.set_do_comment(enabled=True, percentage=50)\r\n    session.set_comments([u'📷🔝�,u'📷❤🙏�,u'❤📷🔝,u'🔝📷❤])\r\n\r\n    # actions\r\n    session.interact_user_followers(['blogviagensevivencias'], amount=30, randomize=False)\r\n    session.interact_user_followers(['vamospraonde'], amount=30, randomize=False)\r\n    session.interact_user_followers(['viajando_sem_parar'], amount=30, randomize=False)\r\n    session.interact_user_followers(['casaldailha'], amount=30, randomize=False)\r\n    session.interact_user_followers(['tripadoiss'], amount=30, randomize=False)\r\n    session.interact_user_followers(['vivendoepostando'], amount=30, randomize=False)\r\n    session.interact_user_followers(['vibenaviagem'], amount=30, randomize=False)\r\n    session.interact_user_followers(['praiasexoticas'], amount=30, randomize=False)\r\n    session.interact_user_followers(['viagemeturismo'], amount=30, randomize=False)\r\n    session.interact_user_followers(['revistaviajar'], amount=30, randomize=False)\r\n    session.interact_user_followers(['casaldailha'], amount=30, randomize=False)\r\n    session.interact_user_followers(['alemaoviajante'], amount=30, randomize=False)\r\n    session.interact_user_followers(['brazilmaravilhas'], amount=30, randomize=False)\r\n    session.interact_user_followers(['trilheiros_do_brasil'], amount=30, randomize=False)\r\n    session.interact_user_followers(['mturismo'], amount=30, randomize=False)\r\n    session.interact_user_followers(['visitbrasil'], amount=30, randomize=False)\r\n    session.interact_user_followers(['destinosbrasileiros'], amount=30, randomize=False)\r\n    session.interact_user_followers(['wanderlustbrazil'], amount=30, randomize=False)\r\n    session.interact_user_followers(['descobrindoobrasil'], amount=30, randomize=False)\r\n    session.interact_user_followers(['muraldobrasil'], amount=30, randomize=False)\r\n    session.interact_user_followers(['viabr'], amount=30, randomize=False)\r\n    session.interact_user_followers(['olhar_brasil'], amount=30, randomize=False)\r\n    session.interact_user_followers(['from.brasil'], amount=30, randomize=False)\r\n    session.interact_user_followers(['br.naturallandscapes'], amount=30, randomize=False)\r\n    session.interact_user_followers(['great_captures_brazil'], amount=30, randomize=False)\r\n    session.interact_user_followers(['brasilnature'], amount=30, randomize=False)\r\n    session.interact_user_followers(['destinosbaianos'], amount=30, randomize=False)\r\n\r\nexcept Exception as exc:\r\n    # if changes to IG layout, upload the file to help us locate the change\r\n    if isinstance(exc, NoSuchElementException):\r\n        file_path = os.path.join(gettempdir(), '{}.html'.format(time.strftime('%Y%m%d-%H%M%S')))\r\n        with open(file_path, 'wb') as fp:\r\n            fp.write(session.browser.page_source.encode('utf8'))\r\n        print('{0}\\nIf raising an issue, please also upload the file located at:\\n{1}\\n{0}'.format(\r\n            '*' * 70, file_path))\r\n    # full stacktrace when raising Github issue\r\n    raise\r\n\r\nfinally:\r\n    # end the bot session\r\n    session.end()\r\n\r\nBut when I set my crontab to run it, it acts weird. It follows and comments on some people´s photos, then it unfollows a couple hours later, and don’t like any photos.\r\n\r\nMy crontab command line is:\r\n \r\n25 17 * * * cd /root/InstaPy && python3 victor.py\r\n \r\nWhat am I doing wrong friends?"}}
{"actor":{"display_login":"converge"}}