Instapy: Failed to load desired amount of users

Created on 19 Jul 2018  路  12Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

Should unfollow users

Current Behavior

Failed to load desired amount of users

How do i solve this error?

Possible Solution (optional)

InstaPy configuration

session.unfollow_users(amount=25, allFollowing=True, style="FIFO", unfollow_after=172800, sleep_delay=180)

wontfix

Most helpful comment

it seems like Instagram has been changing the HTML DOM

to fix this, go to unfollow_util.py and remove "/span" from line 658 & 662
example below:

        if channel == "Follow":
            buttons = dialog.find_elements_by_xpath(
                "//div/div/span/button[text()='Follow']") **### -> remove /span**

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

All 12 comments

it seems like Instagram has been changing the HTML DOM

to fix this, go to unfollow_util.py and remove "/span" from line 658 & 662
example below:

        if channel == "Follow":
            buttons = dialog.find_elements_by_xpath(
                "//div/div/span/button[text()='Follow']") **### -> remove /span**

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

@idpelago I have the same issue when using follow_likers, after trying to get likers from a photo it returns 0 users. Do you know if this fix will work as well? Thanks in advance

I tried that @idpelago working thanks for sharing !

This worked for me as well, thanks for sharing @idpelago !

@idpelago Was the code changed in the latest pull? Because the code on line 658 & 662 is different for me.

Removed /span but still getting the same error.

capture

I am also receiving the same error as mentioned above.

well actually if you pull the latest updates, everything should work

Still not working for me. Pretty sure it's related to the 12-user max follows mentioned in other issues.

@bgunsberger
I have found that you can get around that 12 user issue by simply repeating their name in your list. it's 12 per entry, but this seems to be a useable (if awkward) workaround.

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

drogon34 picture drogon34  路  73Comments

CamiloB picture CamiloB  路  316Comments

awesome205 picture awesome205  路  71Comments

Tachenz picture Tachenz  路  60Comments

lairdep23 picture lairdep23  路  47Comments