te-eg-usage
Telecom Egypt Usage - Selenium simple scraper to get your data usage info
Get your Telecom Egypt account data usage info from my.te.eg website directly from
Python or through the Command-Line Interface entry point. Get what you own
and know why your data is being stolen.
Installation
You will need a webdriver for selenium to run te-eg-usage
Read this for instructions on how to install
one.
Using PyPi
pip install te-eg-usage
Manual installation
git clone https://github.com/FaresAhmedb/te-eg-usage.git
cd te-eg-usage && python setup.py install --user
Usage
Command-Line Interface
First we will have to set enviroment variables for the entry point to access and use to log-in
OS X & Linux:
$ export WE_MOBILE_NUMBER=XXXXXXXXXX
$ export WE_PASSWORD=XXXXXXXX
Windows:
> set WE_MOBILE_NUMBER=XXXXXXXXXX
> set WE_PASSWORD=XXXXXXXX
Now you can use it!
$ te-eg-usage
{
"data_timestamp": 1622923340.4587903,
"consumed": 39.1,
"remaining": 100.9,
"start_date": "2021-06-02",
"renewal_date": "2021-07-02",
"remaining_days": 27,
"renewal_cost": 120.0
}
CLI Arguments
$ # To use a specific webdriver. firefox-headless is the default
$ te-eg-usage --browser BROWSERNAME
$ # Avillable webdrivers are firefox, firefox-headless, chrome, chrome-headless, edge
$
$ # For debug mode
$ te-eg-usage --debug
$
$ # To get a dict Python object instead of JSON
$ te-eg-usage
$
$ # Everything demo
$ te-eg-usage --debug --dict --browser chrome
Pytohn
`This snippet will get you started
from te_eg_usage import TeEgUsage
usage_data_scraper = TeEgUsage(
mobile_number="XXXXXXXXXX",
password="XXXXXXXX",
browser_name="chrome",
)
usage_data = usage_data_scraper.run() # .run(data_type="json") for json
print("\n".join("{}\t{}".format(k, v) for k, v in usage_data.items()))
# output:
# data_timestamp 1622923340.4587903
# consumed 40.0
# remaining 100.0
# start_date YYYY-MM-DD
# renewal_date YYYY-MM-DD
# remaining_days DD
# renewal_cost 120.0
Release History
- 1.0.0
- The Release
Meta
fares ahmed faresahmed@zohomail.com
Distributed under the GPLv3 license. See LICENSE for more information.
https://github.com/faresahmedb/te-eg-usage
Contributing
- Fork it (https://github.com/faresahmedb/te-eg-usage/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
Metadata
Release files for te-eg-usage 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| te-eg-usage-1.0.1.tar.gz | 18.9 kB | Without provenance | Details for te-eg-usage-1.0.1.tar.gz |
Release files / te-eg-usage-1.0.1.tar.gz
| Download URL | te-eg-usage-1.0.1.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4d61ddf0897b536107ed074dd22a02639dae92761a668ed705b503a4b639cb5
|
|
BLAKE2b-256 checksum How to use checksums |
bfe1a809164f804cc2c16e488bccd3e42f4d9749ec0b0ad077291d20191e2ba7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Security for te-eg-usage 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.