Instapy: Unfollow not working anymore

Created on 13 Apr 2018  路  25Comments  路  Source: timgrossmann/InstaPy

Hi,

I usually fix most problems by looking in the existing issues but I couldn't solve this after a few days so I decided to make a post for it.

So Basically I was running 2 different scripts to unfollow people. One was to unfollow after x amount of time. The other one was to unfollow people who are not following me. Both were working fine until a few days ago. They find the users but don't unfollow them anymore. I was thinking it might be a pool related issue but I'm not sure at all.

Sometimes it just crashes after the first unfollow that is finally working, and sometimes it just skips users forever without unfollowing any of them.

By the way I don't even follow as many accounts as 'Number of users available to unfollow' says.

INFO [2018-04-13 18:33:35] [x]  Session started - 2018-04-13 18:33:35
WARNING [2018-04-13 18:33:35] [x]  Sorry, Record Activity is not working on Windows. We're working to fix this soon!
INFO [2018-04-13 18:34:06] [x]  Logged in successfully!
INFO [2018-04-13 18:34:23] [x]  Number of users available to unfollow: 4075
ERROR [2018-04-13 18:34:53] [x]  --> Unfollow error with b'larddyvelasco', maybe no longer exists...
INFO [2018-04-13 18:34:53] [x]  2018-04-04 10:48 ~ larddyvelasco,
 removed from csv
WARNING [2018-04-13 18:34:53] [x]  --> Cannot Unfollow From InstaPy 0, now unfollowing: b'larddyvelasco'
ERROR [2018-04-13 18:35:00] [x]  unfollow error username x might be blocked 
INFO [2018-04-13 18:35:00] [x]  --> Total people unfollowed : 0 
INFO [2018-04-13 18:35:04] [x]  Session ended - 2018-04-13 18:35:04
INFO [2018-04-13 18:35:04] [x]  --------------------


INFO [2018-04-13 18:39:11] [x]  Session started - 2018-04-13 18:39:11
WARNING [2018-04-13 18:39:11] [x]  Sorry, Record Activity is not working on Windows. We're working to fix this soon!
INFO [2018-04-13 18:39:42] [x]  Logged in successfully!
INFO [2018-04-13 18:40:00] [x]  Number of users available to unfollow: 4083
ERROR [2018-04-13 18:40:30] [x]  --> Unfollow error with b'malak_alhoush', maybe no longer exists...
INFO [2018-04-13 18:40:30] [x]  2018-04-04 10:48 ~ malak_alhoush,
 removed from csv
WARNING [2018-04-13 18:40:30] [x]  --> Cannot Unfollow From InstaPy 0, now unfollowing: b'malak_alhoush'
ERROR [2018-04-13 18:41:01] [x]  --> Unfollow error with b'luke_gramza', maybe no longer exists...
INFO [2018-04-13 18:41:01] [x]  2018-04-04 10:48 ~ luke_gramza,
 removed from csv
WARNING [2018-04-13 18:41:01] [x]  --> Cannot Unfollow From InstaPy 0, now unfollowing: b'luke_gramza'
ERROR [2018-04-13 18:41:34] [x]  --> Unfollow error with b'domenicobruno1974', maybe no longer exists...
INFO [2018-04-13 18:41:34] [x]  2018-04-04 10:49 ~ domenicobruno1974,
 removed from csv
WARNING [2018-04-13 18:41:34] [x]  --> Cannot Unfollow From InstaPy 0, now unfollowing: b'domenicobruno1974'
ERROR [2018-04-13 18:41:45] [x]  unfollow error username x might be blocked 
INFO [2018-04-13 18:41:45] [x]  --> Total people unfollowed : 0 
INFO [2018-04-13 18:41:48] [x]  Session ended - 2018-04-13 18:41:48
INFO [2018-04-13 18:41:48] [x]  --------------------

Thanks in advance :)

help wanted wontfix

Most helpful comment

Check the Instagram URL https://www.instagram.com/(youraccount)/?__a=1 - that's 2 x __ and see if you get code or a page saying "Access to Instagram was denied"
This has started for me today (4/13/18)
It looks like Instagram has locked out that function (and I assume the subsequent functions) to assemble the unfollow list.

All 25 comments

Check the Instagram URL https://www.instagram.com/(youraccount)/?__a=1 - that's 2 x __ and see if you get code or a page saying "Access to Instagram was denied"
This has started for me today (4/13/18)
It looks like Instagram has locked out that function (and I assume the subsequent functions) to assemble the unfollow list.

Yes, I got a denied access.

:(
I'm guessing that with all this Cambridge Analytica stuff going on they've plugged a hole that is used to extract data.

but based off the code unfollow_util.py it is not using this API https://www.instagram.com/(youraccount)/?__a=1 tho. Make sure your account is successfully logged in, it might be your cookie is expired.

Yes I think I'm logged in. As it only fails on the unfollow step, it connects the account and browse through Instagram but it just doesn't manage the unfollow action. I had tried it several times also uninstalling and updating chrome version too. And my other scripts for follow work. Just not unfollows.

It is logged in. I have seen other google posts about this happening within the last 24 hrs.
I have tried it on 3 different machines and different browsers.
Everything else is working, it likes, follows, comments without issue

It's the same issue i signaled yesterday on the other unfollow post. It's on and off since the last two days.

If i slow down the actions rate (like/follow/unfollow per hour) it seems to go away for a while. At the moment i'm on a 18 actions per 12 minutes and it's fine again.

Another cure might be to reload the page a couple of times during the unfollow script (but i need more testing/time to be sure).

Slowing down the number of actions doesn't solve it for me.

Nor me. It's dead, Jim..
In my case I have written a PHP script to compare my manually copied and macro filtered arrays of followers / following lists and produce a set of links for me to manually go through and unfollow.
Luckily I have kept my following lists pretty close to my followers, so I'm only anticipating running this maybe weekly.
If anyone is interested I can post the macro routines and PHP code.

I'm still suspecting it has something to do with the rate. I lowered my rate again for the last 24 hours and i don't have any problem today. It's a very strange issue to pin-point as it's truly on and off.

Anyway, i was running a very random loop of Instapy's commands since January and everything was fine till about 2 weeks ago. I started to see some unfollow soft ban (couldn't unfollow for an hour, etc..) and my return/engagement was falling.

After analyzing my logs i totally re-wrote my script to control my quota per minute/hour/etc.. I really think we tend to be too aggressive with our Instapy scripts.

Sometimes less is truly more ;)

But the unfollow section waits 10 min between each batch of 10. Can you pull up the ?__a=1 URL once logged in? That is the first URL the unfollow script calls. If you can still see it, then I'm guessing it's down to 'rollout'
As of this morning (4/14/18) I am not getting the error message anymore, just a blank page.

Yes the unfollow script wait 10 mins (if you set it up to 600).

But if you liked 200 or more pictures in the last hour, those 10 still count in the actions rate. That was for me the real problem regarding the unfollow soft ban.

I have a script that bring back my "following" to a set number, random unfollow between 8-10 then wait for a random 10+ minutes. While i can ran this loop without any problem by itself, if i chain it during a heavy session of like/follow, i'm starting to have some blocked pages while unfollowing..

Finally, i did not check it, but i'm not sure the "only instapy" unfollow script use the ?_a=1 loop. Can anyone confirm?

I understand how the things 'count' towards eachother.
I separated functions out into different scripts to avoid that issue. I run the add/comment/follow script daily, but the unfollow script only every few days, just to catch any stragglers and people who unfollow immediately.
As for the ?__a=1, just create a seperate script (I called mine quickstart_unfollow) and comment out all but the login and unfollow. You'll see that once logged in, it will go to your page, and then to the ?__a=1 page.
That's where it's failing

I'll test the "a=1" when i'm back at home.

Yesterday i had a "Ooops something went wrong" page when trying the "a=1" call and after the fourth/fifth reload it was ok.

Edit: i just tried on my ipad, today the "?_a=1" call works for me, no more "blank page/error". This is truly strange....

I think it's rollout. I have seen this before with facebook / google. It can take a while to go around all of their servers

Yeah but i had the problem for the last 72 hours. But NOT today. That鈥檚 why i think it鈥檚 triggered by something else.

@MikeLewin Is it still not working?

No issue here, works, just running unfollowscript as test.

I've been experiencing the same issue with unfollowing for the last 3-4 days as well. The error I'm getting is as follows:

Traceback (most recent call last): File "quickstart.py", line 30, in <module> session.unfollow_users(amount=20, onlyNotFollowMe=True, sleep_delay=60) File "/root/InstaPy/instapy/instapy.py", line 1507, in unfollow_users self.logfolder) File "/root/InstaPy/instapy/unfollow_util.py", line 171, in unfollow variables['id'] = user_data['id'] UnboundLocalError: local variable 'user_data' referenced before assignment

I haven't changed anything which may have altered this, so it's kinda' weird.

@stainless33
please post your config

me too, instagram has canceled ?__a=1 option. What could we do?

@CharlesCCC Apologies for the delay and thanks for your willingness to assist. When you say config, are you referring to quickstart or unfollow_util?

same error now how to unfollow ?

1.Make the unfollow action first

  1. Change the unfollow util file:
    sleep(30) (instead of 15)

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

Tachenz picture Tachenz  路  85Comments

ardagoktas picture ardagoktas  路  51Comments

andifds picture andifds  路  43Comments

awesome205 picture awesome205  路  71Comments

jtrieuDev picture jtrieuDev  路  52Comments