DocNow / diffengine

track changes to the news, where news is anything with an RSS feed
MIT License
177 stars 30 forks source link

"Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead" #48

Closed hugovk closed 4 years ago

hugovk commented 6 years ago

I have hundreds of mails on my server with this warning:

/usr/local/lib/python3.6/dist-packages/selenium/webdriver/phantomjs/webdriver.py:49: UserWarning: Selenium support for Phantom
JS has been deprecated, please use headless versions of Chrome or Firefox instead
  warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless '

(The PhantomJS repo is being archived: https://github.com/ariya/phantomjs/issues/15344 There may be a fork soon: https://github.com/ariya/phantomjs/issues/15345.)

Ideally diffengine should switch from PhantomJS to headless Chrome (eg.) or Firefox (or the fork), but it'd be good to silence this specific warning in the meantime.

HoxinhLuo commented 5 years ago

Here is a solution: https://stackoverflow.com/questions/48537028/selenium-how-to-use-headless-chrome-on-aws. It does work.

RustamYasaviev commented 4 years ago

Hi, but my rhel8 does not have "chromium-chromedriver". May be you know more about this solution this trouble? Thanks

getmykhan commented 4 years ago

Use Warnings - https://docs.python.org/3/library/warnings.html

import warnings warnings.filterwarnings('ignore')

edsu commented 4 years ago

I think this is the line that needs to change to switch over to headless Chrome or Firefox. Personally I would prefer Firefox if it's as easy as Chrome.

rmdes commented 4 years ago

I'm trying to get around this issue on Ubuntu but I don't see how to switch to headless chrome, any advice would be very much appreciated.

banezaka commented 4 years ago

I'm trying to get around this issue on Ubuntu but I don't see how to switch to headless chrome, any advice would be very much appreciated.

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')`

driver = webdriver.Chrome('chromedriver',chrome_options=chrome_options)
driver.get("http://www.google.com")