Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector' #1

Open
Adefebrian opened this issue Aug 31, 2024 · 1 comment

Comments

@Adefebrian
Copy link

~/Downloads/roasting wkw/wallet-net-worth/wallet-net-worth/scrapx  main !2 ?2   14s
❯ python3 main.py
^[^[Traceback (most recent call last):
File "/Users/adefebrian/Downloads/roasting wkw/wallet-net-worth/wallet-net-worth/scrapx/main.py", line 23, in
driver.find_element_by_css_selector(".u-size2of3").click()
AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector'

~/Downloads/roasting wkw/wallet-net-worth/wallet-net-worth/scrapx  main !2 ?2   60s

@mishania1996
Copy link

find_elements_by_css_selecto method has been deprecated in recent versions of Selenium. Instead, you should use the find_elements() method with the appropriate By class.

But even then, you cannot scrape because now you have to log in. And whenever you log in, twitter finds a way to detect that the requests are automated and blocks the requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants