Instapy: likers_from_photo always returns zero users

Created on 24 Jul 2018  路  6Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

When calling the method (from session.follow_likers(....)) with a url of an image that have many likes I expect that the requsted amount of users are returned.

Current Behavior

The method always returns zero users

Possible Solution (optional)

The error is related to that this line always returns a list of length 0
follow_buttons = dialog.find_elements_by_xpath("//div/div/span/button[text()='Follow']")"

InstaPy configuration

session.set_relationship_bounds(enabled=True,
                                    potency_ratio=-1.0,
                                    delimit_by_numbers=True,
                                    max_followers=4590,
                                    max_following=5555,
                                    min_followers=40,
                                    min_following=50)
    session.set_do_comment(False, percentage=10)

    session.set_dont_include(dont_include)
    session.set_dont_like(['pizza', 'girl'])

    session.set_user_interact(amount=1, randomize=True, percentage=50, media='Photo')

    session.follow_likers(['salomon_danmark', 'northcoastultra', '9000running'], photos_grab_amount=2, follow_likers_per_photo=3, randomize=True,  sleep_delay=6, interact=False)

All 6 comments

I have create a solution for this error. A simple change to an xpath......would like to commit to a branche and make a pull request, but do not seem to have the rights to commit a new branche. How do you normal handle this, @timgrossmann ?

@meinert i tetsed the change you made

return result 馃憥

Getting likers from user: example

shuffling links
Got 12 , returning 1 links: ['https://www.instagram.com/p/example/']
opening likes
Scrolling down... 22 -> 0 / 25
Scrolling finished
Like window closed
Got 0 likers shuffled randomly, who you can follow:
[]

Works fine here. Could someone else test my suggested change? And confirm wheter it is working...

I applied the edit on both line 283 and 294 of commenters_util.py and it seems to be working again for me.

You should edit line 298 too after deleted a path in 282 and 293

check this https://github.com/timgrossmann/InstaPy/pull/2476/

Think we are all done with this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CodeMaster1 picture CodeMaster1  路  3Comments

CharlesCCC picture CharlesCCC  路  3Comments

thisishotdog picture thisishotdog  路  3Comments

seuraltimez picture seuraltimez  路  3Comments

converge picture converge  路  3Comments