bgc_add_vol_pack/README.md

82 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2024-11-05 00:43:29 +00:00
# bgc_add_vol_pack.py
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
The unlimited volume from Belgacom/Proximus is, in fact, limited. And when this limit is reached, your connection is nearly useless because its very low speed.
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
This script help you to easily add extra volume packs, with a headless mode to use it in a monthly cron by example.
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
## Parameters
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
```shell
2016-05-05 11:56:42 +00:00
usage: bgc_add_vol_pack.py [-h] [--repeat REPEAT] [--packSize PACKSIZE]
[--headless HEADLESS]
login password
Add extra data volume pack to Belgacom Internet
positional arguments:
login Belgacom login email
password Belgacom password
optional arguments:
-h, --help show this help message and exit
--repeat REPEAT Number of volume packs to add (1 pack by default)
--packSize PACKSIZE Volume size of the pack to add (150 GB by default)
--headless HEADLESS Headless mode (enabled by default ; using xvfb)
```
2024-11-05 00:43:29 +00:00
## Requirements
2016-05-05 11:56:42 +00:00
This script is using the following Python 3 modules :
2024-11-05 00:43:29 +00:00
- `argparse`
- `selenium`
- `pyvirtualdisplay`
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
And the following cmdline tool (headless mode) :
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
- xvfb (Ubuntu and derivatives) : `sudo apt-get install xvfb`
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
## Examples of use
2016-05-05 11:56:42 +00:00
Add 1 pack of 150 GB (which are default values)
2024-11-05 00:43:29 +00:00
```shell
2016-05-05 11:56:42 +00:00
./bgc_add_vol_pack.py my_login my_password
```
Add 3 packs of 150 GB in headless mode
2024-11-05 00:43:29 +00:00
```shell
2016-05-05 11:56:42 +00:00
./bgc_add_vol_pack.py my_login my_password --repeat 3 --packSize 150
```
Add 10 packs of 20 GB in headless mode disable (FireFox will be opened)
2024-11-05 00:43:29 +00:00
```shell
2016-05-05 11:56:42 +00:00
./bgc_add_vol_pack.py my_login my_password --repeat 10 --packSize 20 --headless 0
```
2024-11-05 00:43:29 +00:00
## Credits
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
These scripts have been modified and improved by Francois B. (Makoto) based on the initial script written by Tuxicoman (see Initial Credits And Licence below)
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
- Website : [Makoto no Blog](https://makotonoblog.be/)
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
## Initial Credits and Licence
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
Copyright (C) 2016 Tuxicoman
2016-05-05 11:56:42 +00:00
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later $
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more detail$
2024-11-05 00:43:29 +00:00
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
Link to the post on Tuxicoman website : <https://tuxicoman.jesuislibre.net/2016/05/internet-vraiment-illimite-chez-belgacomproximus.html>
2016-05-05 12:32:21 +00:00
2024-11-05 00:43:29 +00:00
## Improvements - Changelog
2016-05-05 11:56:42 +00:00
2024-11-05 00:43:29 +00:00
- Updated for Python3
- Any volume pack sizes
- WebDriverWait increased up to 20 to _try_ to avoid login failures
- Headless mode added as optional parameter
- repeat and packSize parameters are optional with default value to 1 pack of 150 GB