Instapy: Unfollow method just deletes user from CSV if unable to unfollow

Created on 22 Sep 2018  路  4Comments  路  Source: timgrossmann/InstaPy

Current Behavior

I am using the latest code as on 20-Sep-2018.

When the unfollow method cannot unfollow an user (even a valid user whom I am still following), it just deletes the user from the CSV file. This is will leave the deleted users be followed by account forever.

Expected Behavior/Possible Solution

When unable to unfollow an user and when there is no error page (could be user deleted or renamed), ignore the user for the moment and leave the user in the CSV file (because only reason I can think of is, the bot is unable to get hold of the element because of some recent changes made by Instagram). If the user is left in the CSV file, a further update to InstaPy will take care of the user.

InstaPy configuration

session.unfollow_users(amount=30, InstapyFollowed=(True, "nonfollowers"), style="RANDOM", unfollow_after=168 * 60 * 60, sleep_delay=600)

Screenshots

2018-09-22 20_38_07-

2018-09-22 20_00_20-

Log

`INFO [2018-09-22 09:11:06] [myuserid] Session ended!
INFO [2018-09-22 19:36:30] [myuserid] Session started!
INFO [2018-09-22 19:37:09] [myuserid] Logged in successfully!
INFO [2018-09-22 19:37:13] [myuserid] Starting to unfollow users..
INFO [2018-09-22 19:37:13] [myuserid] Unfollowing the users followed by InstaPy

INFO [2018-09-22 19:37:13] [myuserid] Retrieving live Followers data of myuserid at "full" range
INFO [2018-09-22 19:37:34] [myuserid] Grabbed 228 usernames from Followers in 16.07 seconds
INFO [2018-09-22 19:37:34] [myuserid] Stored Followers data at E:Workspacegithub_clonesInstaPyInstaPy-2018-09-20InstaPylogsmyuserid/relationship_data/myuserid/followers/22-09-2018~full~228.json local file
INFO [2018-09-22 19:37:34] [myuserid] Zz :[ time to take a good nap ~sleeping 24.0 seconds
INFO [2018-09-22 19:38:15] [myuserid] Yawn :] let's go!

INFO [2018-09-22 19:38:15] [myuserid] Found 14 loyal followers! ~will not unfollow them
INFO [2018-09-22 19:38:15] [myuserid] Total 33 users available to unfollow ~didn't pass unfollow_after: 152

INFO [2018-09-22 19:38:15] [myuserid] Ongoing Unfollow [1/30]: now unfollowing 'b'joanbundoc''...
INFO [2018-09-22 19:39:03] [myuserid] --> Unfollowed 'joanbundoc'!
INFO [2018-09-22 19:39:04] [myuserid] Removed '2018-09-15 10:24 ~ joanbundoc ~ 2778897' from followedPool.csv file
INFO [2018-09-22 19:39:19] [myuserid] Ongoing Unfollow [2/30]: now unfollowing 'b'sonia_bkss''...
INFO [2018-09-22 19:39:47] [myuserid] --> Unfollowed 'sonia_bkss'!
INFO [2018-09-22 19:39:47] [myuserid] Removed '2018-09-15 10:55 ~ sonia_bkss ~ 7892725967' from followedPool.csv file
INFO [2018-09-22 19:40:06] [myuserid] Ongoing Unfollow [3/30]: now unfollowing 'b'jadejonot''...
INFO [2018-09-22 19:40:34] [myuserid] --> Unfollowed 'jadejonot'!
INFO [2018-09-22 19:40:35] [myuserid] Removed '2018-09-15 11:24 ~ jadejonot ~ 23560718' from followedPool.csv file
INFO [2018-09-22 19:40:46] [myuserid] Ongoing Unfollow [4/30]: now unfollowing 'b'soru503''...
INFO [2018-09-22 19:41:16] [myuserid] --> Unfollowed 'soru503'!
INFO [2018-09-22 19:41:17] [myuserid] Removed '2018-09-15 17:19 ~ soru503 ~ 181249782' from followedPool.csv file
INFO [2018-09-22 19:41:33] [myuserid] Ongoing Unfollow [5/30]: now unfollowing 'b'irene_vecchi''...
INFO [2018-09-22 19:42:55] [myuserid] Timed out with failure while explicitly waiting until visibility of element located!

INFO [2018-09-22 19:44:13] [myuserid] Timed out with failure while explicitly waiting until visibility of element located!

ERROR [2018-09-22 19:44:13] [myuserid] --> Unable to detect the following status of 'b'irene_vecchi''!
INFO [2018-09-22 19:44:13] [myuserid] Pinging 'instagram.com' to check the connectivity...
INFO [2018-09-22 19:44:14] [myuserid] Checking if 'myuserid' is logged in...
WARNING [2018-09-22 19:44:20] [myuserid] Maybe 'b'irene_vecchi'' has changed the username! ~verifying through the user ID
INFO [2018-09-22 19:45:42] [myuserid] Timed out with failure while explicitly waiting until visibility of element located!

INFO [2018-09-22 19:47:00] [myuserid] Timed out with failure while explicitly waiting until visibility of element located!

ERROR [2018-09-22 19:47:00] [myuserid] --> Unable to detect the following status of 'b'irene_vecchi''!
WARNING [2018-09-22 19:47:00] [myuserid] --> Couldn't access the profile page of 'b'irene_vecchi''! ~user has either closed the profile or blocked you
INFO [2018-09-22 19:47:00] [myuserid] Removed '2018-09-15 10:18 ~ irene_vecchi ~ 574050285' from followedPool.csv file
INFO [2018-09-22 19:47:06] [myuserid] Ongoing Unfollow [5/30]: now unfollowing 'b'alsukari''...
INFO [2018-09-22 19:47:12] [myuserid] --> Couldn't unfollow 'b'alsukari''! ~maybe unfollowed before
INFO [2018-09-22 19:47:12] [myuserid] Removed '2018-09-15 01:11 ~ alsukari ~ 291833489' from followedPool.csv file
INFO [2018-09-22 19:47:17] [myuserid] Ongoing Unfollow [5/30]: now unfollowing 'b'champenoise5102''...
INFO [2018-09-22 19:47:22] [myuserid] --> Couldn't unfollow 'b'champenoise5102''! ~maybe unfollowed before
INFO [2018-09-22 19:47:22] [myuserid] Removed '2018-09-15 10:49 ~ champenoise5102 ~ 343221060' from followedPool.csv file
INFO [2018-09-22 19:47:26] [myuserid] Ongoing Unfollow [5/30]: now unfollowing 'b'little.choses''...
INFO [2018-09-22 19:47:30] [myuserid] --> Couldn't unfollow 'b'little.choses''! ~maybe unfollowed before
INFO [2018-09-22 19:47:30] [myuserid] Removed '2018-09-15 10:19 ~ little.choses ~ 1921672202' from followedPool.csv file
INFO [2018-09-22 19:47:37] [myuserid] Ongoing Unfollow [5/30]: now unfollowing 'b'ogotham_93350''...
INFO [2018-09-22 19:47:42] [myuserid] --> Couldn't unfollow 'b'ogotham_93350''! ~maybe unfollowed before
INFO [2018-09-22 19:47:42] [myuserid] Removed '2018-09-15 10:13 ~ ogotham_93350 ~ 4341385079' from followedPool.csv file
INFO [2018-09-22 19:47:48] [myuserid] Ongoing Unfollow [5/30]: now unfollowing 'b'nessleehanne''...
INFO [2018-09-22 19:47:52] [myuserid] --> Couldn't unfollow 'b'nessleehanne''! ~maybe unfollowed before
INFO [2018-09-22 19:47:52] [myuserid] Removed '2018-09-15 10:21 ~ nessleehanne ~ 1767660795' from followedPool.csv file
INFO [2018-09-22 19:47:58] [myuserid] Ongoing Unfollow [5/30]: now unfollowing 'b'artandpeoplenl''...
ERROR [2018-09-22 19:48:50] [myuserid] Unfollow loop error:

INFO [2018-09-22 19:48:50] [myuserid] --> Total people unfollowed : 4

INFO [2018-09-22 19:48:53] [myuserid] Sessional Live Report:
|> LIKED 0 images | ALREADY LIKED: 0
|> COMMENTED on 0 images
|> FOLLOWED 0 users | ALREADY FOLLOWED: 0
|> UNFOLLOWED 4 users
|> INAPPROPRIATE images: 0
|> NOT VALID users: 0
currently FOLLOWING 493 users & has got 228 FOLLOWERS

INFO [2018-09-22 19:48:53] [myuserid] Session ended!`

wontfix

Most helpful comment

It will be in the "uncertien" file so it is not forever.
I do have this issue sometimes as well.

  • I think a second reload should be made
  • I think we need to go over uncertain file from time to time and check it.

All 4 comments

It will be in the "uncertien" file so it is not forever.
I do have this issue sometimes as well.

  • I think a second reload should be made
  • I think we need to go over uncertain file from time to time and check it.

@sionking Are there currently any functions or programs that interact with the uncertain_unfollowedPool file or does it just exist right now?

I have this issue a lot (about 30% from the unfollow session).

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. > If this problem still occurs, please open a new issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thisishotdog picture thisishotdog  路  3Comments

ediooo picture ediooo  路  3Comments

converge picture converge  路  3Comments

v77v picture v77v  路  3Comments

deronsizemore picture deronsizemore  路  3Comments