You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
And if im using your commented line
"unlike": "//[contains(@Class, 'x78zum5')]/button/div/[[local-name()='svg']/@aria-label='Unlike']/",
Its just saying:
INFO [2023-06-13 20:35:02] [ridethelegacy] Image from: b'sebastianstorch'
INFO [2023-06-13 20:35:02] [ridethelegacy] Image link: b'https://www.instagram.com/p/CtcNV9XNooN/'
INFO [2023-06-13 20:35:02] [ridethelegacy] Description: b'#ktm#duke#125#bking1340#suzuki\n#streetfighter#suzukigsxs750\n#sharkexhaust#feierabendrunde\n#sch\xc3\xb6nwars#herrlicheswetter#100kmrunde'
INFO [2023-06-13 20:35:37] [ridethelegacy] --> Image...
INFO [2023-06-13 20:36:02] [ridethelegacy] --> Image was not able to get liked! maybe blocked?
INFO [2023-06-13 20:37:32] [ridethelegacy] --> Invalid Like Element!
INFO [2023-06-13 20:37:32] [ridethelegacy] Like# [2/99]
INFO [2023-06-13 20:37:32] [ridethelegacy] https://www.instagram.com/p/CtcNTrDxmqv/
Thank you. I also noticed same issue on some other selector path. Its maybe because they use dynamic selector path based on geolocation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Description
Made three changes:
Fixes # (issue)
#6716
Checklist:
black -t py34