nikilkumar9 / InstaBot

A collection of Python scripts that automates the Firefox browser to log on to a Instagram account (account username and password specified by user in each script) to like/follow/unfollow user photos, accounts and more (script specific information and instructions follow). Users can use InstaBot passively and will be notified of completion/status of tasks through an automatic Gmail email.
7 stars 2 forks source link

Unable to locate element: button during the processing of following people with the hashtag based script #4

Open felixfong227 opened 5 years ago

felixfong227 commented 5 years ago

image

Text version of the error message shown above

Following users now
Traceback (most recent call last):
  File "hashtagBased_follow.py", line 189, in <module>
    ig.follow_user()
  File "hashtagBased_follow.py", line 145, in follow_user
    follow = driver.find_element_by_css_selector('button')
  File "/home/ubuntu/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 598, in find_element_by_css_selector
    return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
    'value': value})['value']
  File "/home/ubuntu/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: button

Before this error message, the script can actually put a few likes into some of the photos, but after that just throw an error.

Thanks 🙇

nikilkumar9 commented 5 years ago

Hi Felix, at the time of this error, was the Firefox driver/browser stuck on the user profile's page, or was the page not found or something else?