edsu / etudier

Extract a citation network from Google Scholar
161 stars 27 forks source link

webdriver ojbect has no attribute 'find_element_by_css_selector' #27

Closed shawngraham closed 1 year ago

shawngraham commented 1 year ago

Hi,

Was trying to set etudier up on a mac mini m1.

Had to set up chromium with:

brew install --cask chromedriver  
brew install --cask google-chrome

And then get this error. Just filing this here. thanks!

 shawngraham@Shawns-Mac-mini etudier % etudier 'https://scholar.google.com/scholar?hl=en&as_sdt=0,5&q=%22agent-based+model%22+archaeology'
Traceback (most recent call last):
  File "/Users/shawngraham/mambaforge/envs/py38/bin/etudier", line 8, in <module>
    sys.exit(main())
  File "/Users/shawngraham/mambaforge/envs/py38/lib/python3.8/site-packages/etudier/__init__.py", line 41, in main
    for from_pub, to_pub in get_citations(args.url, depth=args.depth, pages=args.pages):
  File "/Users/shawngraham/mambaforge/envs/py38/lib/python3.8/site-packages/etudier/__init__.py", line 135, in get_citations
    html = get_html(url)
  File "/Users/shawngraham/mambaforge/envs/py38/lib/python3.8/site-packages/etudier/__init__.py", line 239, in get_html
    recap = driver.find_element_by_css_selector(
AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector'
NikitaIT commented 1 year ago

Hotfix:

pip3 uninstall selenium

pip3 install selenium~=4.0.0

NikitaIT commented 1 year ago

Fixed in: https://github.com/edsu/etudier/pull/23

edsu commented 1 year ago

Thanks for the report, and my apologies for not seeing this sooner. This should be fixed in v0.1.3 on PyPI.