Simplest possible python link-shortener

Viewed 100

I want to make the simplest possible Url shortener in Python.

like this:

link = input("Type your link:")

#print output

I can use for this Python libraries if needed.

I want the code to be as simple as possible - 10 lines maximum.

The code must be efficient.

1 Answers

The simplest possible Url shortener in Python:

import pyshorteners

#link = 'https://yourwebsitehere.com/'

link = input("Type your link")

print(pyshorteners.Shortener().clckru.short(link))

#output: https://clck.ru/*****
Related