Instapy: Follow and unfollow don't work when using nogui=True

Created on 10 Nov 2017  路  11Comments  路  Source: timgrossmann/InstaPy

Hi,

I downloaded InstaPy last weekend and got it running smoothly since then. It works great although there's one big issue since a couple of days: unfollow doesn't work.

The followedPool.csv is being filled with followed account names without any problems. When a new run starts with unfollowing accounts from this pool the output shows accounts are being unfollowed but in reality only a few out of 100 accounts are actually being unfollowed.

This is my unfollow setting:

session.unfollow_users(amount=100, onlyInstapyFollowed = True, onlyInstapyMethod = 'FIFO', sleep_delay=60 )

Should I change the sleep_delay to 600? I read somewhere that you have to wait 10 minutes after unfollowing 10 accounts. But the default sleep_delay was set to 60 when I first checked out InstaPy.

bug help wanted wontfix

All 11 comments

I got some issues with unfollowing. It unfollows everybody from pool but still there was users to unfollow but they were not in the pool. So I made unfollow to its own session after following and it's now working fine after couple tests.

Like this:

session = InstaPy(username=insta_username, password=insta_password)
session.login()
session.set_do_comment(True, percentage=10)
session.like_by_tags(['natgeo', 'world'], amount=100)
session.end()

session = InstaPy(username=insta_username, password=insta_password)
session.login()
session.unfollow_users(amount=10, onlyInstapyFollowed = True, onlyInstapyMethod = 'FIFO', sleep_delay=60)
session.end()

EDIT: Didn't solve my problem.

I got same issues. i try to fix it with new xpath and it worked on my pc can you try this?
https://github.com/pleum/InstaPy/commit/92240e20b6d4d8416646a64f8cb8370c5cc30d50

@pleum @Sillanmaki @rvarseveld can you guys help testing #915 ? after that, we can merge.

My problem is that bot starts follow users which are not mentioned in console and that's why they are not in followedPool (I don't know why, when or how). I try to figure it out.

I still have the same problem and follow now also has issues.

I set the percentage follows to 35% and in the output it says quite some users are being followed but in reality only a very few users are actually being followed (for example, only 2 users in about 1 hour).

@converge so it looks likes the original issue has not been fixed and is more complicated than I thought as it not only involves unfollows but follows too (which is even more important).

@converge @timgrossmann

I did some more testing and found out the follow/unfollow issue only occurs when running the script on my server using nogui=True

When I run the script locally on my laptop then everything seems to work fine.

So a short summary here:

Running on a DigitalOcean US server using nogui=True:

  • Liking works fine
  • Commenting works fine
  • Following doesn't work (only a few out of 100 whereas in the log it says it followed 100)
  • Unfollowing doesn't work (only 1 out of 100 whereas in the log it says it unfollowed 100)

Running on macbook:

  • No problems

So there is something going wrong when using a virtual display. I'm a developer myself but not familiar with Selenium nor Python. I used the following guide to set up my server: https://github.com/timgrossmann/InstaPy/blob/master/docs/How_To_DO_Ubuntu_on_Digital_Ocean.md

@timgrossmann @converge not sure whether you guys have an idea what the cause might be but is there some further testing I can do?

@rvarseveld Have you updated the chrome driver and pulled the newest InstaPy version?

@timgrossmann Yes, I will do some further testing to see whether I can pinpoint this issue.

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

rahulkapoor90 picture rahulkapoor90  路  3Comments

harrypython picture harrypython  路  3Comments

CharlesCCC picture CharlesCCC  路  3Comments

Spyd3r0us picture Spyd3r0us  路  3Comments

neomh picture neomh  路  3Comments