Program should run
Bot not liking since last night
I have checked a few solutions but nothing seems to work,
edited the "like_util.py"
from this:
def like_image(browser, username, blacklist, logger, logfolder):
"""Likes the browser opened image"""
# fetch spans fast
spans = [x.text.lower() for x in browser.find_elements_by_xpath("//article//a[@role='button']/span")]
to this:
def like_image(browser, username, blacklist, logger, logfolder):
like_xpath = "//button/span[text()='Like']/.."
unlike_xpath = "//button/span[text()='Unlike']"
# fetch spans fast
spans = [x.text.lower() for x in browser.find_elements_by_xpath("//article//button/span")]
Getting an ERROR:
File "C:\Users\dvlav\Documents\InstaBot - David\instapy\instapy.py", line 942, in like_by_tags
self.logfolder)
File "C:\Users\dvlav\Documents\InstaBot - David\instapy\like_util.py", line 590, in like_image
click_element(browser, like_elem[0])
IndexError: list index out of range
Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x000002D9991CC0B8>>
Traceback (most recent call last):
File "C:\Users\dvlav\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium-2.53.6-py3.6.egg\selenium\webdriver\common\service.py", line 163, in __del__
File "C:\Users\dvlav\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium-2.53.6-py3.6.egg\selenium\webdriver\common\service.py", line 139, in stop
File "C:\Users\dvlav\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium-2.53.6-py3.6.egg\selenium\webdriver\common\service.py", line 110, in send_remote_shutdown_command
ImportError: sys.meta_path is None, Python is likely shutting down
please update the master:
git pull origin master
@MrDebashis
I鈥檓 sorry for the noob question, but how do you do that?
Go inside InstaPy
run the above command
(If you are using Windows, Use Gitbash to run the command)
If Still doubts, please search in Youtube/Google.
@MrDebashis
$ git pull origin master
From https://github.com/timgrossmann/InstaPy
* branch master -> FETCH_HEAD
Already up to date.
Still not liking... getting the same error:
--> Invalid Like Element!
Bump
+1
+1
Tried the same fix as the OP still getting the error.
+1
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
Most helpful comment
please update the master:
git pull origin master