Closed Derektvann closed 3 years ago
Got it running, kinda. it opens chrome and types in the user name and password, but that is all.
- Mac OS:11.2.2
- Browser Chrome (60)
this is what terminal shows me....
thisisme-iMac:InstagramBot thisisme$ python3 instagramBot.py Traceback (most recent call last): File "/Users/thisisme/Desktop/InstagramBot/instagramBot.py", line 83, in <module> start() File "/Users/thisisme/Desktop/InstagramBot/instagramBot.py", line 68, in start nextButton = browser.find_element_by_xpath('/html/body/div[1]/section/main/div/article/div/div[1]/div/form/div/div[3]/button ') File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element return self.execute(Command.FIND_ELEMENT, { File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/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":"/html/body/div[1]/section/main/div/article/div/div[1]/div/form/div/div[3]/button "} (Session info: chrome=90.0.4430.72) #
It looks like Instagram added Cookies acceptance and changed some buttons, It should work now, if, check if you see cookies accept pop-up, if you don't, comment lines 62-64.
I have updated the bot, see commit comments. Good luck, don't forget to star this repo 👍
Got it running, kinda. it opens chrome and types in the user name and password, but that is all.
this is what terminal shows me....
`thisisme-iMac:InstagramBot thisisme$ python3 instagramBot.py Traceback (most recent call last): File "/Users/thisisme/Desktop/InstagramBot/instagramBot.py", line 83, in
start()
File "/Users/thisisme/Desktop/InstagramBot/instagramBot.py", line 68, in start
nextButton = browser.find_element_by_xpath('/html/body/div[1]/section/main/div/article/div/div[1]/div/form/div/div[3]/button ')
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/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":"/html/body/div[1]/section/main/div/article/div/div[1]/div/form/div/div[3]/button "}
(Session info: chrome=90.0.4430.72)
`