Skip to content

developkz/link_shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Link Shortener

The script receives a short link through the Bit-ly API. And also get the number of clicks for links created by the user earlier.

Bitli API Token

This script can't work without Bit-link access token. To get Bit-link use the following instructions Click here

Environment setup

Copy or clone this repository to your local machine.

Rename .env.sample in to .env. Replace <Your bitlink token>to your Bit-link token.

Should be something similar to: BITLINK_TOKEN=23123hoy48124ydqs7dglqs7dgbdoqbwd78

Create environment inside project folder, run command:

python3 -m venv env

To activate environment run command:

source env/bin/activate

To install needed packages run command:

pip install -r requirements.txt

Documentation

Run script.

python3 link_shortener.py YOUR_LINK
#Bitlink created: https://bit.ly/3DCyocP

Script answer if Bit-link is already created:

python3 link_shortener.py YOUR_LINK
#Clicks Count: 3

About

script for shortening links through bit.ly api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages