deftdawg / rogersusage

A Python script to check bandwidth usage for Rogers Cable Internet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rogersusage.py

A python script to get internet usage data for customers of Rogers cable internet.

History

  • Nov 20, 2018: Updated to run with Python3
  • May 30, 2017: Updated to v2.0, which fixes the script after changes to the Rogers site broke the old version.
  • 2.0.1: Restored compatibility with requests versions below 2.15.
  • 2.0.2: Improved output of cap information on unlimited plans.
  • 2.0.3: Workaround for inconsistencies in Rogers authentication process

Requirements

  • Python 2.7. If your Python environment defaults to Python 3, you may need to explicitly run it with Python 2.7.
  • requests. Installed via pip install requests, easy_install or from source.
  • A login for the My Rogers site, used for managing your Rogers account.
  • Optional: the keyring library. If installed, the keyring will be used to securely store passwords. The storage mechanism depends on what OS you're running—on Mac OS X, it uses the system Keychain; read the keyring lib documentation for full details.

Usage

Running the script

Open a command prompt, and run python rogersusage.py. Provide the full paths to the python executable and the script as necessary.

Configuration

The script will prompt for a My Rogers login ID (typically an email address) and password. You can also provide one with the command line parameters: -l USERNAME (or --login=USERNAME) and -p PASSWORD (or --password=PASSWORD). These will supersede any stored login details.

Options

  • -h, --help
    • Print a help message with a description of the options
  • -t, --totals
    • Output only the total usage and usage allowance amounts.
  • --csv
    • Print the data only (no labels or units) as comma-separated values. Format: Download,Upload,Total,Cap Amount,Remaining Usage. Units: GB. Useful for importing or parsing the data into other programs. Remaining usage will be empty on unlimited plans.
  • -l USERNAME, --login=USERNAME
    • Rogers login ID
  • -p PASSWORD, --password=PASSWORD
    • Rogers login password

Sample Output

Downloaded: 57.61 GB
Uploaded: 4.64 GB
Total Usage: 62.25 GB
Usage Cap: 300.0 GB
Remaining Usage: 237.75 GB
Percentage Used: 21 %
Days Remaining: 20 days

Notes

This is provided as-is, with no warranty or guarantee of any kind it will work. Hopefully someone else will find it useful. It uses an undocumented and unsupported API from Rogers, any changes could break things in the future.

About

A Python script to check bandwidth usage for Rogers Cable Internet


Languages

Language:Python 100.0%