{"action":"created","issue":{"url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2077","repository_url":"https://api.github.com/repos/timgrossmann/InstaPy","labels_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2077/labels{/name}","comments_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2077/comments","events_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2077/events","html_url":"https://github.com/timgrossmann/InstaPy/issues/2077","id":325236300,"node_id":"MDU6SXNzdWUzMjUyMzYzMDA=","number":2077,"title":"session.unfollow_users() return value","user":{"login":"HermanoCrespo","id":35911674,"node_id":"MDQ6VXNlcjM1OTExNjc0","avatar_url":"https://avatars3.githubusercontent.com/u/35911674?v=4","gravatar_id":"","url":"https://api.github.com/users/HermanoCrespo","html_url":"https://github.com/HermanoCrespo","followers_url":"https://api.github.com/users/HermanoCrespo/followers","following_url":"https://api.github.com/users/HermanoCrespo/following{/other_user}","gists_url":"https://api.github.com/users/HermanoCrespo/gists{/gist_id}","starred_url":"https://api.github.com/users/HermanoCrespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HermanoCrespo/subscriptions","organizations_url":"https://api.github.com/users/HermanoCrespo/orgs","repos_url":"https://api.github.com/users/HermanoCrespo/repos","events_url":"https://api.github.com/users/HermanoCrespo/events{/privacy}","received_events_url":"https://api.github.com/users/HermanoCrespo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-22T10:38:30Z","updated_at":"2018-11-14T11:09:02Z","closed_at":null,"author_association":"NONE","body":"My code to unfollow is:\r\n\r\n`for i in range(0,7):`\r\n                `.        unfollowAmount = randint(9,10)`\r\n                `.         session.unfollow_users(amount=unfollowAmount, onlyInstapyFollowed=True, onlyInstapyMethod='FIFO', sleep_delay=0, unfollow_after=4 * 24 * 60 * 60)`\r\n                `.         # sleep 420 to 480 seconds`\r\n                `.         sleepTime = randint(420, 480)`\r\n                `.         time.sleep(sleepTime)`\r\n\r\nsorry for the horrible formatting, here prettier:\r\n![snippet](https://user-images.githubusercontent.com/35911674/40357292-0b93fe70-5dff-11e8-9bc6-931ff03619e7.png)\r\n\r\nSometimes, I do not have anything to unfollow because `unfollow_after` condition is not met. The code still runs and goes through the loop 7 times which is a time waster.\r\n\r\nI was wondering how to mitigate that.\r\n\r\nMy idea was, maybe `session.unfollow_users()` returns a different value if it has no users to unfollow, I could test for that and then only sleep, if the condition for unfollowing is met.\r\n\r\nSo, the question: Does `session.unfollow_users()` return a value and if so is it different if it is not unfollowing? That could be useful."},"comment":{"url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/comments/438625673","html_url":"https://github.com/timgrossmann/InstaPy/issues/2077#issuecomment-438625673","issue_url":"https://api.github.com/repos/timgrossmann/InstaPy/issues/2077","id":438625673,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODYyNTY3Mw==","user":{"login":"stale[bot]","id":26384082,"node_id":"MDM6Qm90MjYzODQwODI=","avatar_url":"https://avatars3.githubusercontent.com/in/1724?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-11-14T11:09:02Z","updated_at":"2018-11-14T11:09:02Z","author_association":"NONE","body":"This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.   \n> If this problem still occurs, please open a new issue \n"}}
{"actor":{"display_login":"stale"}}