Scweet
Scweet copied to clipboard
get_user_follow fails since new chrome version
Hi, When scraping followers and followings, I receive the following error (since the update of chrome on my linux pc from version 98.xxx to 99.xxx):
Traceback (most recent call last):
File "~/Scweet/utils.py", line 385, in get_users_follow
log_in(driver, env, wait=wait)
File "~/Scweet/utils.py", line 305, in log_in
email_el = driver.find_element(By.XPATH, email_xpath)
File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 1244, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@autocomplete="username"]"}
(Session info: headless chrome=99.0.4844.51)
Stacktrace:
#0 0x5613b9b24233
Thank you for looking into this problem.
I've added Firefox support in the fork here: https://github.com/rosscg/Scweet/
It's set as the default in get_users_follow so it can run without changing anything else.
Hi, @rosscg
Thanks for your contribution. I found that you import
from .const import get_username, get_password, get_email, get_geckdriver_path
but .const
does not contains get_geckdriver_path
.
Could you help me?
@ShoufaChen Yes that's an import I replaced (so shouldn't be there). I've updated the repo so either use the latest on my fork or just remove ", get_geckdriver_path" from that line in utils.py
Thank you @rosscg.
Thank you @rosscg and @ShoufaChen, it's working again (The firefox version, not yet the chrome version).