I have had the bot working a few days and it went very well but today, without editing the code, the unfollow instructions started to faik giving an error like in this issue:
https://github.com/timgrossmann/InstaPy/issues/2754
Yes... this issue is back! My 3 are like this! It seems to me that its only occurring for session.follow_user_followers
Error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[text()='Followers' or text()='Following']/../../following-sibling::div"}
Edit: Before showing the exception above ...
INFO [2018-11-29 22:48:49] [my_login] Starting to follow user `Followers`..
INFO:my_login:Starting to follow user `Followers`..
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
there are some Problems with the xPath aTm it seems
I was working on this and I dont think I'll find some free time tomorrow to finish it, can anyone help ?
https://github.com/converge/InstaPy/commit/9957f214e525ab61f16cbbb0c5566fa640797948
I think it just needs to scroll the unfollow page now.
yeah getting same message.
I was working on this and I dont think I'll find some free time tomorrow to finish it, can anyone help ?
I think it just needs to scroll the unfollow page now.
ok, Jp... I put:
dialog_address = "//div[3]/div/div/div[2]" #<--- maybe
and uncomment
logger.info("\n{}".format(upper_char * ceil(output_len/len(upper_char))))
Its working, man! Excellent!
In unfollow_util.py
Temporary replace
dialog = browser.find_element_by_xpath(
"//div[text()='Followers' or text()='Following']/../../following-sibling::div")
with
dialog = browser.find_element_by_xpath(
"//div[contains(@class,'isgrP')]")
IT WORKS!
Use this to temporary fix and get your algorithm running. Cause it is working for me.
I was working on this and I dont think I'll find some free time tomorrow to finish it, can anyone help ?
converge@9957f21
I think it just needs to scroll the unfollow page now.ok, Jp... I put:
dialog_address = "//div[3]/div/div/div[2]" #<--- maybe
and uncomment
logger.info("\n{}".format(upper_char * ceil(output_len/len(upper_char))))
Its working, man! Excellent!
Is it a solution? 馃槷
Same error
Traceback (most recent call last):
File "sergio.py", line 47, in
amount=ammount_number, randomize=False, interact=True, sleep_delay=240)
File "/Users/x/Documents/Instagram/InstaPy-master 6/instapy/instapy.py", line 2839, in follow_user_followers
self.logfolder)
File "/Users/x/Documents/Instagram/InstaPy-master 6/instapy/unfollow_util.py", line 884, in get_given_user_followers
channel, jumps, logger, logfolder)
File "/Users/x/Documents/Instagram/InstaPy-master 6/instapy/unfollow_util.py", line 651, in get_users_through_dialog
dialog = browser.find_element_by_xpath(dialog_address)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 393, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 966, in find_element
'value': value})['value']
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[text()='Followers' or text()='Following']/../../following-sibling::div"}
(Session info: headless chrome=70.0.3538.110)
(Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.14.0 x86_64)
I need help to confirm that my fix works, could anyone assist ?
https://github.com/timgrossmann/InstaPy/pull/3463
@converge for me it doesn't work , i dont know if i am writing well the code, but i followed your steps and i had the same error.
@converge dialog_address = "//button[text()='Followers' or text()='Following']"
dialog_address = "//div[3]/div/div/div[2]" this worked for me mate thank you.
@converge I think it also gives error when following by user, so the replacement should need to be done in more than one InstaPy file, if I'm not wrong.
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
I was working on this and I dont think I'll find some free time tomorrow to finish it, can anyone help ?
https://github.com/converge/InstaPy/commit/9957f214e525ab61f16cbbb0c5566fa640797948
I think it just needs to scroll the unfollow page now.