Fixed firefox_profile and some xpath and css selectors. by mk1995 · Pull Request #6718 · InstaPy/InstaPy
Thanks it worked, atleast almost . Still having issues of detecting the unlike:
INFO [2023-06-13 20:19:52] [ridethelegacy] Session ended!
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\InstaPy\run.py", line 84, in
session.like_by_tags(my_hashtags, amount=90, media=None)
File "C:\Users\Administrator\Desktop\InstaPy\instapy\instapy.py", line 2006, in like_by_tags
like_state, msg = like_image(
^^^^^^^^^^^
File "C:\Users\Administrator\Desktop\InstaPy\instapy\like_util.py", line 763, in like_image
liked_elem = browser.find_elements(By.XPATH, unlike_xpath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 770, in find_elements
return self.execute(Command.FIND_ELEMENTS, {"using": by, "value": value})["value"] or []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidSelectorException: Message: Given xpath expression "[class='x78zum5']>span:nth-child(2)>button" is invalid: SyntaxError: Document.evaluate: The expression is not a legal expression; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#invalid-selector-exception
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:183:5
InvalidSelectorError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:343:5
find_@chrome://remote/content/marionette/element.sys.mjs:168:11
element.find/</findElements<@chrome://remote/content/marionette/element.sys.mjs:116:24
evalFn@chrome://remote/content/marionette/sync.sys.mjs:119:7
PollPromise/<@chrome://remote/content/marionette/sync.sys.mjs:139:5
PollPromise@chrome://remote/content/marionette/sync.sys.mjs:110:10
element.find/<@chrome://remote/content/marionette/element.sys.mjs:114:24
element.find@chrome://remote/content/marionette/element.sys.mjs:113:10
findElements@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:274:25
receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:108:31