https://github.com/purarue/pythonanywhere-3-months
clicks the 'Run until 3 months from today' button on pythonanywhere, so your website doesn't deactivate automatically
https://github.com/purarue/pythonanywhere-3-months
autologin chromedriver pythonanywhere selenium
Last synced: 9 months ago
JSON representation
clicks the 'Run until 3 months from today' button on pythonanywhere, so your website doesn't deactivate automatically
- Host: GitHub
- URL: https://github.com/purarue/pythonanywhere-3-months
- Owner: purarue
- License: unlicense
- Created: 2019-07-03T04:47:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T17:44:21.000Z (about 1 year ago)
- Last Synced: 2025-03-29T10:03:54.364Z (10 months ago)
- Topics: autologin, chromedriver, pythonanywhere, selenium
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 6
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pythonanywhere-3-months
Logs into your [pythonanywhere](https://www.pythonanywhere.com/) 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](https://gist.github.com/purarue/709a824b8c56ea22dbf4e86a7804287d) for chromedriver.
#### Install and Run:
```
python3 -m pip install git+https://github.com/purarue/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.