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: module 'selenium.webdriver' has no attribute 'PhantomJS' #26

Open
kupietools opened this issue Nov 5, 2022 · 2 comments

Comments

@kupietools
Copy link

python3 -m mediascraper.twitter Doesn't work.

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Volumes/500GB/Users/Shared/moved from ~/Downloads/media-scraper/mediascraper/twitter.py", line 12, in <module>
    scraper = mediascrapers.TwitterScraper(scroll_pause = 1.0, mode='normal', debug=False)
  File "/Volumes/500GB/Users/Shared/moved from ~/Downloads/media-scraper/mediascrapers.py", line 378, in __init__
    super().__init__(**kwargs)
  File "/Volumes/500GB/Users/Shared/moved from ~/Downloads/media-scraper/mediascrapers.py", line 38, in __init__
    self._driver = seleniumdriver.get('PhantomJS')
  File "/Volumes/500GB/Users/Shared/moved from ~/Downloads/media-scraper/util/seleniumdriver.py", line 36, in get
    driver = webdriver.PhantomJS(executable_path=source, service_log_path=join(path, 'phantomjs.log'), service_args=["--remote-debugger-port=9000", "--web-security=false"]) 
AttributeError: module 'selenium.webdriver' has no attribute 'PhantomJS'
@KP9982
Copy link

KP9982 commented Feb 21, 2023

PhantomJS support was removed from Selenium after 3.3.0
Install the old version

pip uninstall selenium 
pip install -U selenium==3.3.0

@Giosthebest
Copy link

PhantomJS support was removed from Selenium after 3.3.0 Install the old version

pip uninstall selenium 
pip install -U selenium==3.3.0

It still doesn't work for me.
Screenshot 2024-08-03 005316
Screenshot 2024-08-03 005330

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

4 participants
@Giosthebest @kupietools @KP9982 and others