Python Anywhere

Can you run selenium on PythonAnywhere?

I had to ask ai what selenium is. Any python package available on pip you can use.

BUT

no gui. (from AI it sounded like selenium also has GUI)

and most importantly, on free accounts, network access is extremely limited to only whitelisted domains. (Yea that truly sucks!) so while tons of sites are open, it depends what you’ll be using it for, you’ll probably run into issues…

Its a chromedriver

I know but it also provides features for cli scraping where it looks like chromium to the websites (if i understood ai correctly.) as far as i’m aware, pythonanywhere doesn’t support gui at all. Unless you host it as a website (meaning it runs selenium somehow the gui is piped or whatever to the site you’re hosting) but as i said i don’t know selenium well enough.

api.trycloudflare.com:443

Is blocked

you can make it post a screenshot every 1 second

If the free tier allowws dynamic sites. Not so sure it does.

I think the wsgi expects you to return a static site (or response in case of webhook) pretty fast or else it kills it.

Whatever I have better ways, I just run a python terminal on a computer with a *.trycloudflare.com url

pythonanywhere becomes stupid (for free accounts)

pythonanywhere used to be a reliable free service for minimalist hosting (webhooks or websites).

the free tier used to include:

  • 100 cpu seconds (at max strength. Much more in reality)
  • free domain at yourusername.pythonanywhere.com
  • they serve the website for 3 months. Once in 3 months you gotta manually login and click continue for 3 months.
  • static sites only and if you’re program doesn’t return fast enough it gets killed silently.
  • pretty good support
  • 1 daily scheduled task
  • outgoing requests only to whitelisted domains
  • 512mb of storage
  • 2 consoles
  • i might’ve missed some stuff

while these may seem like very little with tons of limitations, its still ok for minimalist webhooks or static sites. (all free accounts like these include limitations. This is the best 1 out there i think for python.)

now they limited it even more
here’s what changed:

  • they now only serve it for 1 month. which means you gotta remember every month to loggin and click continue. (even credit card payments we do automatic. who’d remember this)
  • 0 daily scheduled tasks (old accounts aren’t affected yet)
  • no support at all (besides forums)
  • i heard that they made the whitelist for outgoing requests smaller but can’t confirm

conclusion

depending on what you’re using it for, it’s still reliable and works well for basic stuff such as a static flask website or a simple groupme webhook. Just remember: no scheduled tasks, limited outgoing requests, only about 5 minutes max for you’re program to load before returning or it crashes, and worst of all you’ll have to manually click to continue it every month. If you need something solid (free), you may wanna look into oracle vps. (I posted somewhere on the forums how i set it up)

3 Likes

Just forgot for the first time about some old GroupMe bot I made for my friend and he complained that it stopped working.

Turns out I forgot to log in and click “run until 1 month from today”. Got me fed up so I moved it to my vps. But made this for anyone that uses pythonanywhere

2 Likes