This script allows:
- To shorten the link.
- Count the number of clicks on a shortened link.
This project interacts with the site bit.ly
Some of the settings are taken from the environment. To define them, create a file .env
next to the file main.py
and write there data in this format: VARIABLE=value
.
The following variables are available:
BITLY_TOKEN
โ your personal token from bit.ly
- Save files on your computer.
- Install dependencies:
pip3 install -r requirements.txt
- Run main.py in the console:
python3 main.py www.yourlink.com
- If you want to shorten the link, enter your link as the first argument.
- If you want to count clicks on links, enter a shortened link as the first argument.
- If you want to see help, enter a -h or --help as the first argument