Forums

Enable Headless Chrome

Please enable headless chrome on my account. In reference with: https://www.pythonanywhere.com/forums/topic/13623/#id_post_68541

Sure, no problem -- that's done now. If you want to use Chrome, you'll need to upgrade Selenium for your account -- for example, if you're using Python 3.7, run this in Bash:

pip3.7 install --user --upgrade selenium

...and then you can run Selenium with Chrome using code like this:

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)

try:
    browser.get("https://www.google.com")
    print("Page title was '{}'".format(browser.title))

finally:
    browser.quit()

Hi, not trying to hijack this post, but would it also be possible to activate headless chrome on my account as well? I'm trying to create a task that firefox is unable to execute. Thank you if possible.

Sure! You just need to follow the next steps from my post above.

Hello, could you please activate my account for headless chrome ? Thank you

Sure! We have done that for you, thanks!

Hello conrad. It is giving '(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)' error while i try to use headless chrome with the settings in your post above. Could you please check it's enabling or if another problem occurs please let me know sir. Thank you.

Are you running that in a console that you created after @conrad made the change?

Hello, could you please activate my account for headless chrome ? Thank you

It is already activated on all accounts by default.

hello, it not working for me, i got this message: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Thanks it works for me

Glad to hear that!

My chrome headless not working with proxy extension. I want to use proxies to scrap data but when i add proxy extension in headless mode it not working. Please can you look at it????

What kind of errors are you getting?