ffreemt / extend-euserv

Extend expiry date of euserv.com via Github Actions using pyppeteer2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extend-euserv

pythonCode style: blackLicense: MITPyPI version

Extend expiry date of euserv.com

Update 20211102: No longer works. Euserv has implemented a new mechanism (PIN via email) for extending expiry date. Automatic renewal will be difficult if not impossible.

Automate extending expiry date of euserv.com

Installtion

not ready yet pip install extend-euserv

or clone https://github.com/ffreemt/extend-euserv and install from the repo.

Usage

Supply euserv email and password from the command line:

python -m extend-euserv -u your_euserv_email -p password

or use directly the extend-euserv script:

extend-euserv -u your_euserv_email -p password

Use environment variables EUSERV_EMAIL and EUSERV_PASSWORD

  • Set email/password from the command line:
    set EUSERV_EMAIL=your_euserv_email  # export in Linux or iOS
    set EUSERV_PASSWORD=password
  • Or set email/password in .env, e.g.,
    # .env
    EUSERV_EMAIL=your_euserv_email
    EUSERV_EMAIL=password
    

Run extend-euserv or python -m extend_euserv:

extend-euserv

or

python -m extend_euserv

Check information only

extend-euserv -i

or

python -m extend_euserv -i

Print debug info

extend-euserv -d

or

python -m extend_euserv -d

Brief Help

extend-euserv --helpshort

or

python -m extend_euserv --helpshort

Turn off Headless Mode (Show the browser in action)

You can configure EUSERV_HEADFUL, EUSERV_DEBUG and EUSERV_PROXY in the .env file in the working directory or any of its parent directoreis. For example,

# .env
EUSERV_HEADFUL=1
EUSERV_DEBUG=true
# EUSERV_PROXY

Automation via Github Actions

It's straightforward to setup extend-euserv to run via Github Actions, best with an infrequent crontab.

  • Fork this repo
  • Setup Actions secrets via Settings/Add repository secrets:
Name Value
EUSERV_EMAIL: your_euserv_email
EUSERV_PASSWORD: your_euserv_password

For example, in .github/workflows/schedule-extend-euserv.yml

name: schedule-extend-euserv

on:
  push:
  schedule:
    - cron: '10,40 3 */9 * *'
...
setup, e.g. pip install -r requirements.txt or
poetry install --no-dev
...

      - name: Testrun
        env:
          EUSERV_EMAIL: ${{ secrets.EUSERV_EMAIL }}
          EUSERV_PASSWORD: ${{ secrets.EUSERV_PASSWORD }}
        run: |
          python -m extend_euserv -d -i

About

Extend expiry date of euserv.com via Github Actions using pyppeteer2


Languages

Language:Python 100.0%