Instapy: Warning: Comment Button Not Found

Created on 8 Jul 2018  Â·  12Comments  Â·  Source: timgrossmann/InstaPy

Expected Behavior

Expecting InstaPy to comment on an image according to session parameters.

Current Behavior

InstaPy is returning the following message, "Warning: Comment Button Not Found: May cause issues with browser windows of smaller widths". Likes and follows appear to be working fine, just not comments.

InstaPy configuration

Currently running InstaPy on RPI3, headless with the latest commit and chrome driver updated.

wontfix

Most helpful comment

@MikeLewin @marcomokastyle Can you confirm that your updated xpath works when running without GUI? My applied fix was to change the comment_input variable xpath to the following and run with GUI (since the add a comment input field only appears in the generated source):

comment_input = browser.find_elements_by_xpath(
        '//textarea[contains(@placeholder,"Add a comment…")]')

Which works because there's only one placeholder attribute containing that value lol

All 12 comments

Hi @austinallen01
I had the same issue (i run with the browser in the background), a quick fix is to reduce the zoom level of the browser to <80%. It will fix the comments.

Hope this helps.

I have the same issue as you, I am running it on a Ubuntu server so I can't reduce the zoom level :(

I can confirm this.
Readjusting zoom level did nothing..
I have also tried with a couple of different versions of Chromedriver (2.36 fixed it before)
With this, and the like button, and the unfollow modal, they've been busy recently.. :(

@guillaumeteillet and @austinallen01
Try this:
in comment_util.py
find -
open_comment_section(browser):

under -
comment_elem = browser.find_elements_by_xpath(

change
"//a[@role='button']/span[text()='Comment']/..")
to
"//button/span[text()='Comment']/..")

Hope it helps :)

change the line in comment_util.py:

comment_elem = browser.find_elements_by_xpath(
        "//button/span[text()='Comment']/..")

LOL, that's what I said.. :)

@MikeLewin @marcomokastyle Can you confirm that your updated xpath works when running without GUI? My applied fix was to change the comment_input variable xpath to the following and run with GUI (since the add a comment input field only appears in the generated source):

comment_input = browser.find_elements_by_xpath(
        '//textarea[contains(@placeholder,"Add a comment…")]')

Which works because there's only one placeholder attribute containing that value lol

I'm getting the same error on RPi3B+

@Mikelewin yours works with noGUI then?

At the current version of instapy, despite having the "Warning ..." shown, the comment is successful posted by instapy!

I'm getting the same error on RPi3B and firefoxESR

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