Forums

Chrome Selenium

Hi, I am looking to use Chrome Selenium on Pythonanywhere. Could you please enable it for my account? Thank you!

Just to confirm- as a free user, you would only be able to access whitelisted sites and not the rest of the internet.

If you are okay with that, we can turn on the virtualization system for you that would allow you to run Chrome.

Because you are on an earlier system image, you would still need to build Chrome etc yourself before you can successfully run it.

If you like we could also update you to the latest system image, which would have Chrome installed for you.

Yes, please turn on the virtualization system as well as update my account with the latest system image to include Chrome. Could I also check if there is a list of the whitelisted sites that can be accessed any where? Thank you!

Okay, we have done that for you. You will have to restart any consoles, tasks and webapps for the changes to take effect.

Can I get in on this too, please? Basically, everything you did for jayzhoukj. Thanks!

Nice!!!! I was working on that also...I tried to use Selenium, ChromeDrive on my PC, lots of wired errors, then I searched for something else. I am using Beautiful soup and fake agent instead. But My Boss want me to work in incognito mode, and establish the location. The script is working OK, but I don't know how to set location and Incognito/secret mode. Selenium can do that I guess. Also I have no white list problem, I am searching on Google.com.

Then If you are ok can you turn on the selenium.

No problem, @bottime and @Tsurubaso, I have updated your accounts.

Thank you @glenn

Hello, Is there a recent tutorial or discussion about the use of Selenium in here.

All that we have at this point is this (once you have the feature that allows headless Chrome enabled):

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()

Thanks @Giles

No problem!

Hi, We are looking to use Chrome Selenium on Pythonanywhere. Could you please enable it for my account? Thank you!

TechVani. It's done for you.

thanks. but it's still giving me this error : selenium.common.exceptions.WebDriverException: 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.) (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1106-aws x86_64).

thank you in advance

have you upgraded selenium?

yes, I have upgraded selenium. I tried running my code in shell, but it gave me the error as I mentioned above. here's my code

pip3 install --user --upgrade selenium

python3

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()

Is it in the fresh newly created console (after your account settings were changed by us)?

I uninstalled it and reinstalled it, and now it works fine. thanks.

Glad to hear that!

Hey,Could you please enable Chrome Selenium on Pythonanywhere for my account

No problem. I have enabled it for your account.

hi! Could you please enable Chrome Selenium on Pythonanywhere for my account.

It's already enabled for everyone.

hi! Could you please enable Chrome Selenium on Pythonanywhere for my account, please

It is already enabled for all accounts. However, you are running with an older system image, which may have issues. You can update your system image from your Account page.

hi! Could you please enable Chrome Selenium on Pythonanywhere for my account.

It is already enabled for all accounts.

hi! Could you please enable fake-user agent on Pythonanywhere for my account.

You can install it. See https://help.pythonanywhere.com/pages/InstallingNewModules