/bitly

A python script that shortens url with Bitly service

Primary LanguagePython

A python script to shorten url with Bitly API

A python script that shortens provided url with Bitly service or gives clicks summary if url is already shortened bitly link.

Requirements

Python >= 3.5 required.
Install dependencies with

pip install -r requirements.txt

For better interaction is recommended to use virtualenv.

For successful work script required Bitly OAuth access token. For more details please read following:

  1. Bitly authentication documentation.
  2. Bitly support theme answer.

Usage

In same directory with script create .env file with auth_bitly_token variable inside.

Examples:

python main.py http://ccbv.co.uk/
Link has been generated: http://bit.ly/2RllTNG
python main.py http://bit.ly/2LYO7bi
Bitly link clicks total summary : 5