InstaPy icon indicating copy to clipboard operation
InstaPy copied to clipboard

Unfollow issue

Open michaelBielang opened this issue 8 years ago • 9 comments

Hi,

since my instapy had the last few weeks some real big issues like it was in a deadlock where instapy tried over and over again to unfollow the same people because their profiles, it was said, were no longer available.

That's why I just deleted my "i_am_user" folder in logs folder.

After that I wanted to just unfollow everyone with the commands below. But as you can see below, now nothing works at all :-(

Any idea how to fix?

Expected Behavior

Unfollow all I am following

Current Behavior

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2018-07-19 19:34:19] [i_am_user]  Session started!
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo


..........................................................................
INFO [2018-07-19 19:34:47] [i_am_user]  Logged in successfully!
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

_______________________________________________________________________________
INFO [2018-07-19 19:34:49] [i_am_user]  Starting to unfollow users..
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
ERROR [2018-07-19 19:34:49] [i_am_user]  set_automated_followed_pool error [Errno 2] No such file or directory: '/home/usr/venv/bin/InstaPy/logs/i_am_user/i_am_user_followedPool.csv'
INFO [2018-07-19 19:34:50] [i_am_user]  Unfollowing the users you are following
INFO [2018-07-19 19:35:45] [i_am_user]  Failed to load desired amount of users
ERROR [2018-07-19 19:35:45] [i_am_user]  Sorry, an error occured: 'bool' object is not subscriptable

InstaPy configuration

session.unfollow_users(amount=20, allFollowing=True, style="RANDOM", unfollow_after=1, sleep_delay=600)

michaelBielang avatar Jul 19 '18 17:07 michaelBielang

it is happening something similar to me

INFO [2018-07-19 13:53:04] [igaccount] Unfollowing the users you are following ERROR [2018-07-19 13:53:09] [igaccount] Sorry, an error occured: 'bool' object is not subscriptable

cesarcm96 avatar Jul 19 '18 19:07 cesarcm96

@cesarcm96 same here, changed both files unfollow util and my custom py and same like cesar quote

alezhke avatar Jul 19 '18 20:07 alezhke

Actually you can open up Instagram's web version and noticed that its HTML DOM has changed which cause Instapy's code can't find the element.

To fix this simply go to unfollow_util.py at line 631 ~ 639

if channel == "Follow":
        # get follow buttons. This approach will find the follow buttons and
        # ignore the Unfollow/Requested buttons.
        buttons = dialog.find_elements_by_xpath(
            "//div/div/button[text()='Follow']") -> **remove the /span**

    elif channel == "Unfollow":
        buttons = dialog.find_elements_by_xpath(
            "//div/div/button[text()='Following']") -> **remove the /span**

zheskiel avatar Jul 20 '18 02:07 zheskiel

@idpelago I already did that, that solve the problem of “Failed to load desired amount of users” but the error “bool object is not suscriptable” is still ocurring

cesarcm96 avatar Jul 20 '18 03:07 cesarcm96

@idpelago its bool failure means somewhere mistake at the code...

alezhke avatar Jul 20 '18 05:07 alezhke

This "FIX: updated xpath in unfollow util #2463" doesn't work for me. Have tested it.

michaelBielang avatar Jul 21 '18 12:07 michaelBielang

Same problem here. Last update still showing :

Sorry, an error occured: 'bool' object is not subscriptable"

when try to unfollow.

I appreciate your help to solve this issue.

jg-main avatar Jul 22 '18 13:07 jg-main

i got the same error here !

_________________________________________________________________
INFO [2018-07-24 12:05:08] [xxx]  Starting to unfollow users..
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2018-07-24 12:05:09] [xxx]  Unfollowing the users you are following
ERROR [2018-07-24 12:05:14] [xxx]  Sorry, an error occured: 'bool' object is not subscriptable

session.unfollow_users(amount=200, allFollowing=True, style="FIFO", unfollow_after=0, sleep_delay=600)

HCWcoder avatar Jul 24 '18 09:07 HCWcoder

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

stale[bot] avatar Nov 14 '18 02:11 stale[bot]