{"action":"created","issue":{"url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1650","repository_url":"https://api.github.com/repos/timgrossmann/InstaPy","labels_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1650/labels{/name}","comments_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1650/comments","events_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1650/events","html_url":"https://github.com/timgrossmann/InstaPy/issues/1650","id":305736384,"number":1650,"title":"script doesn't do \"unfollow\"","user":{"login":"anoirinoh","id":29501785,"avatar_url":"https://avatars3.githubusercontent.com/u/29501785?v=4","gravatar_id":"","url":"https://api.github.com/users/anoirinoh","html_url":"https://github.com/anoirinoh","followers_url":"https://api.github.com/users/anoirinoh/followers","following_url":"https://api.github.com/users/anoirinoh/following{/other_user}","gists_url":"https://api.github.com/users/anoirinoh/gists{/gist_id}","starred_url":"https://api.github.com/users/anoirinoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anoirinoh/subscriptions","organizations_url":"https://api.github.com/users/anoirinoh/orgs","repos_url":"https://api.github.com/users/anoirinoh/repos","events_url":"https://api.github.com/users/anoirinoh/events{/privacy}","received_events_url":"https://api.github.com/users/anoirinoh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-15T22:08:26Z","updated_at":"2018-03-16T08:08:31Z","closed_at":null,"author_association":"NONE","body":"<!-- Is this a Feature Request ? Please, check out our Wiki first https://github.com/timgrossmann/InstaPy/wiki -->\r\n## Expected Behavior\r\n\r\nunfollow the following\r\n\r\n## Current Behavior\r\n\r\ndoesn't unfollow the following\r\n\r\n## InstaPy configuration (file that i launch)\r\n\r\n`\"\"\"Example Case of the Script\"\"\"\r\nfrom instapy import InstaPy\r\n\r\n# if you don't provide arguments, the script will look for INSTA_USER and INSTA_PW in the environment\r\nsession = InstaPy(username='', password='')\r\n\r\n\"\"\"Logging in\"\"\"\r\n# logs you in with the specified username and password\r\nsession.login()\r\n\r\n\"\"\"Comment util\"\"\"\r\n# default enabled=False, ~ every 4th image will be commented on\r\nsession.set_do_comment(enabled=True, percentage=25)\r\nsession.set_comments(['Awesome', 'Really Cool', 'I like it', 'cool', 'So Cute'])\r\n# you can also set comments for specific media types (Photo / Video)\r\nsession.set_comments(['Nice shot!','Awesome', 'Really Cool', 'I like it', 'cool', 'So Cute'], media='Photo')\r\nsession.set_comments(['Awesome', 'Really Cool', 'I like it', 'cool', 'So Cute'], media='Video')\r\n\r\n\"\"\"Follow util\"\"\"\r\n# default enabled=False, follows ~ every 10th user from the images\r\nsession.set_do_follow(enabled=False, percentage=25)\r\n\r\n\"\"\"Image Check with Image tagging api\"\"\"\r\n# default enabled=False , enables the checking with the clarifai api (image tagging)\r\n# if secret and proj_id are not set, it will get the environment Variables\r\n# 'CLARIFAI_API_KEY'\r\nsession.set_use_clarifai(enabled=False, api_key='xxx')\r\n#                                        ^\r\n# ^If specified once, you don't need to add them again\r\n\r\nsession.set_use_clarifai(enabled=False)\r\nsession.set_use_clarifai(enabled=True)  # <- will use the one from above\r\n\r\n# uses the clarifai api to check if the image contains nsfw content\r\n# Check out their homepage to see which tags there are -> won't comment on image\r\n# (you won't do this on every single image or the 5000 free checks are wasted very fast)\r\nsession.clarifai_check_img_for(['nsfw'], comment=False)  # !if no tags are set, use_clarifai will be False\r\n\r\n# checks the image for keywords food and lunch, if found, sets the comments possible comments\r\n# to the given comments\r\nsession.clarifai_check_img_for(['food', 'lunch'], comment=True, comments=['Tasty!', 'Yum!'])\r\nsession.clarifai_check_img_for(['dog', 'cat', 'cute'], comment=True, comments=['Sweet!', 'Cutie!!!'])\r\n\r\n\"\"\"Like util\"\"\"\r\n# completely ignore liking images from certain users\r\nsession.set_ignore_users(['random_user', 'another_username'])\r\n# searches the description and owner comments for the given words\r\n# and won't like the image if one of the words are in there\r\nsession.set_dont_like(['food', 'eat', 'meal'])\r\n# will ignore the don't like if the description contains\r\n# one of the given words\r\nsession.set_ignore_if_contains(['glutenfree', 'french', 'tasty'])\r\n\r\n\"\"\"Unfollow util\"\"\"\r\n# will prevent commenting and unfollowing your good friends\r\nsession.set_dont_include([])\r\n\r\n\"\"\"Different tasks\"\"\"\r\n# you can put in as much tags as you want, likes 100 of each tag\r\nsession.like_by_tags([], amount=100)\r\n# you can also set to like a specific media (Photo / Video)\r\nsession.like_by_tags([], amount=10, media='Photo')\r\n\r\n# get's the tags from the description and likes 100 images of each tag\r\nsession.like_from_image(url='www.instagram.com/image', amount=100)\r\n# media filtering works here as well\r\nsession.like_by_tags([], amount=10, media='Video')\r\n# like 10 random posts of each given username\r\nsession.like_by_users(usernames=['friend1', 'friend2', 'friend3'], amount=10, random=True)\r\n\r\n\"\"\"\"Like by feed\"\"\"\r\n# likes a given amount of posts on your feed, taking into account settings of commenting, like restrictions etc\r\nsession.like_by_feed(amount=100)\r\n# can also randomly skips posts to be liked\r\nsession.like_by_feed(amount=100, randomize=True)\r\n# if it comes across some posts I declared as inappropriate it will automatically unfollow its author user\r\nsession.like_by_feed(amount=100, randomize=True, unfollow=True)\r\n# visits the author's profile page of a certain post and likes a given number of his pictures, then returns to feed\r\nsession.like_by_feed(amount=100, randomize=True, unfollow=True, interact=True)\r\n\r\n\r\n# follows the followers of a given user\r\n# The usernames can be either a list or a string\r\n# The amount is for each account, in this case 30 users will be followed\r\n# If random is false it will pick in a top-down fashion\r\n# default sleep_delay=600 (10min) for every 10 user following, in this case sleep for 60 seconds\r\nsession.follow_user_followers([], amount=10, random=False, sleep_delay=60)\r\n# For 50% of the 30 newly followed, move to their profile\r\n# and randomly choose 5 pictures to be liked.\r\n# Take into account the other set options like the comment rate\r\n# and the filtering for inappropriate words or users\r\nsession.set_user_interact(amount=5, random=True, percentage=50, media='Photo')\r\nsession.follow_user_followers([], amount=10, random=False, interact=True)\r\n# default sleep_delay=600 (10min) for every 10 user following, in this case sleep for 60 seconds\r\nsession.follow_user_followers([], amount=10, random=False, interact=True, sleep_delay=60)\r\n\r\n# follows the people that a given user is following\r\n# Same rules as the function above\r\nsession.follow_user_following('friend2', amount=10, random=True, sleep_delay=60)\r\n# For 50% of the 30 newly followed, move to their profile\r\n# and randomly choose 5 pictures to be liked.\r\n# Take into account the other set options like the comment rate\r\n# and the filtering for inappropriate words or users\r\nsession.set_user_interact(amount=5, random=True, percentage=50, media='Photo')\r\nsession.follow_user_following(['friend1', 'friend2', 'friend3'], amount=10, random=False, interact=True)\r\nsession.follow_user_following(['friend1', 'friend2', 'friend3'], amount=10, random=False, interact=True, sleep_delay=60)\r\n\r\n\r\n#Interact with the people that a given user is following\r\n#set_do_comment, set_do_follow and set_do_like are applicable\r\nsession.set_user_interact(amount=5, random=True, percentage=50, media='Photo')\r\nsession.set_do_follow(enabled=False, percentage=70)\r\nsession.set_do_like(enabled=False, percentage=70)\r\nsession.set_comments([\"Cool\", \"Super!\"])\r\nsession.set_do_comment(enabled=True, percentage=80)\r\nsession.interact_user_following([''], amount=10, random=True)\r\n\r\n\r\n#Interact with the people that is following a given user\r\n#set_do_comment, set_do_follow and set_do_like are applicable\r\nsession.set_user_interact(amount=5, random=True, percentage=50, media='Photo')\r\nsession.set_do_follow(enabled=False, percentage=70)\r\nsession.set_do_like(enabled=False, percentage=70)\r\nsession.set_comments([\"Cool\", \"Super!\"])\r\nsession.set_do_comment(enabled=True, percentage=80)\r\nsession.interact_user_followers(['natgeo'], amount=10, random=True)\r\n\r\n\r\nsession.unfollow_users(enabled=True, amount=10, onlyInstapyFollowed = True, onlyInstapyMethod = 'FIFO', sleep_delay=60)  \r\n# unfollows 10 of the accounts your following -> instagram will only unfollow 10 before you'll be 'blocked for 10 minutes' (if you enter a higher number than 10 it will unfollow 10, then wait 10 minutes and will continue then)\r\n\r\n\"\"\" Like by Locations \"\"\"\r\n\r\nsession.like_by_locations(['c2490299', 'c2703980', 'c2438177', 'c2421830', 'c2487404', 'c2427178'], amount=100) \r\n\r\n\"\"\"Extras\"\"\"\r\n#Reduces the amount of time under sleep to a given percentage\r\n#It might be useful to test the tool or to increase the time for slower connections (percentage > 100)\r\nsession.set_sleep_reduce(20)\r\n\r\n\r\n\"\"\"Ending the script\"\"\"\r\n# clears all the cookies, deleting you password and all information from this session\r\nsession.end()\r\n`\r\n\r\n\r\nI have reached 6k following :/"},"comment":{"url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/comments/373635457","html_url":"https://github.com/timgrossmann/InstaPy/issues/1650#issuecomment-373635457","issue_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/1650","id":373635457,"user":{"login":"joanroig","id":12451419,"avatar_url":"https://avatars2.githubusercontent.com/u/12451419?v=4","gravatar_id":"","url":"https://api.github.com/users/joanroig","html_url":"https://github.com/joanroig","followers_url":"https://api.github.com/users/joanroig/followers","following_url":"https://api.github.com/users/joanroig/following{/other_user}","gists_url":"https://api.github.com/users/joanroig/gists{/gist_id}","starred_url":"https://api.github.com/users/joanroig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joanroig/subscriptions","organizations_url":"https://api.github.com/users/joanroig/orgs","repos_url":"https://api.github.com/users/joanroig/repos","events_url":"https://api.github.com/users/joanroig/events{/privacy}","received_events_url":"https://api.github.com/users/joanroig/received_events","type":"User","site_admin":false},"created_at":"2018-03-16T08:08:31Z","updated_at":"2018-03-16T08:08:31Z","author_association":"NONE","body":"@martinkuna is the \"enabled=True\" necessary?"}}
{"actor":{"display_login":"joanroig"}}