Skip to content

clicks the 'Run until 3 months from today' button on pythonanywhere, so your website doesn't deactivate automatically

License

Notifications You must be signed in to change notification settings

seanbreckenridge/pythonanywhere-3-months

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pythonanywhere-3-months

Logs into your pythonanywhere account and clicks the 'Run until 3 months from today' button, so your website doesn't deactivate automatically.

Requires: Python 3.6+ and a chromedriver binary. See here for chromedriver.

Install and Run:

python3 -m pip install git+https://github.com/seanbreckenridge/pythonanywhere-3-months
pythonanywhere_3_months -Hc /usr/local/bin/chromedriver

As long as no visible errors are thrown, the script succeeded. You can run it without the -H flag to watch it log in and click the relevant links/buttons.

usage: pythonanywhere_3_months [-h] [-H] [-c CHROMEDRIVER_PATH] [-d]

Clicks the 'Run until 3 months from today' on pythonanywhere

options:
  -h, --help            show this help message and exit
  -H, --hidden          Hide the ChromeDriver.
  -c CHROMEDRIVER_PATH, --chromedriver-path CHROMEDRIVER_PATH
                        Provides the location of ChromeDriver. Should probably
                        be the full path.
  -d, --debug           Prints debug logs

Put pythonanywhere credentials in your home directory; at $XDG_DATA_HOME/pythonanywhere_credentials.yaml (~/.local/share/pythonanywhere_credentials.yaml) with contents like:

username: yourusername
password: 2UGArHcjfKz@9GCGuNXN

This also installs a command line script called pythonanywhere_check_since which prints nothing if pythonanywhere_3_months has been run in the last 2 months, but prints a reminder to run it otherwise. I have pythonanywhere_check_since in my ~/.zshrc (equivalent to ~/.bashrc or ~/.bash_profile) file; it checks whenever I open a shell.

About

clicks the 'Run until 3 months from today' button on pythonanywhere, so your website doesn't deactivate automatically

Topics

Resources

License

Stars

Watchers

Forks

Languages