Hi,
is it possible to optimize code for
.interact_user_followers
I'm running following script:
from instapy import InstaPy
insta_username = 'XXXXX'
insta_password = 'XXXXXX'
InstaPy(username=insta_username, password=insta_password, nogui=True)\
.login()\
.set_upper_follower_count(limit=500)\
.set_lower_follower_count(limit=100)\
.set_user_interact(amount=2, random=True, percentage=95, media='Photo')\
.set_do_follow(enabled=True, percentage=70)\
.set_do_like(enabled=True, percentage=70)\
.set_comments([u':thumbsup:'])\
.set_do_comment(enabled=True, percentage=80)\
.interact_user_followers(['rav_shana'], amount=100, random=True)\
.unfollow_users(amount=500, onlyInstapyFollowed = True)\
.end()
If script encounter user that is bellow or above follower count, I'm getting following:
Username [77/257]
--> b'quite_a_beauty_'
Getting quite_a_beauty_ image list...
Interaction begin...
--> Not following
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
Post [1/2]
Image from: b'quite_a_beauty_'
Number of Followers: 2806
--> Image not liked: Number of followers exceeds limit
-------------
--> Given amount not fullfilled, image pool reached its end
I assume that it should be no interaction with a user once he is out of the limits
I also noticed, that in between users that _are_ within the min/max follower criteria, the script still navigates back to their profile between every photo like.
@BernardoGO ?
I can fix this with one line of code to skip a user as soon as any of their photos are deemed "inappropriate"
anything new on this? I've got the same problem.
It started know when I added:
from random import sample
...
users = [ 'xx' ]
...
.interact_user_followers(sample(users, 2), amount=100, random=True) \
...
to my script.
hey guys, there is a PR to fix it , can someone help testing it ? #936
fixed
Most helpful comment
hey guys, there is a PR to fix it , can someone help testing it ? #936