Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python link shortener

'''
Install pyshorteners for URL Shortner by python project by via the following command:
pip install pyshorteners
'''

import pyshorteners

link = input("")
shorteners = pyshorteners.Shortener()
shortlink = shorteners.tinyurl.short(link)
print(shortlink)
Comment

how to make a url shortener in python

#How to make a URL Shortener in Python

####You need to install " pip install pyshorteners " in the terminal / powershell

## Code:

import pyshorteners
link = input("Enter link :  ")
shortener = pyshorteners.Shortener()
x=shortener.tinyurl.short(link)
print(x)
Comment

python url shortener

import pyshorteners as short
from time import sleep 

text="""
 _____         _     _   _ _____         _
|_   _|__  ___| |__ |  | |___ / _ __ __| |
  | |/ _ / __| '_ |  | | |_ | '__/ _` |
  | |  __/ (__| | | | |  |___) | | | (_| |
  |_|\___|\___|_| |_|_| \_|____/|_|  \__,_|
  
  Github: https://github.com/cloudtechhills/
"""

title = """
 _   _ ____  _         ____  _                _                       
| | | |  _ | |       / ___|| |__   ___  _ __| |_ ___ _ __   ___ _ __ 
| | | | |_) | |       \___ | '_  / _ | '__| __/ _  '_  / _  '__|
| |_| |  _ <| |___     ___) | | | | (_) | |  | ||  __/ | | |  __/ |   
 \___/|_| \_\_____|___|____/|_| |_|\___/|_|   \__\___|_| |_|\___|_|   
                 |_____|                                              

"""
##THIS PROGRAM SHORTENS A LONG URL TO A SHORT SIZED URL FOR ANY PURPOSE.


print(text)
sleep(1)
print(title)
link = str(input("Enter the URL link: "))

shortener = short.Shortener()

tiny_url = shortener.tinyurl.short(link)

print("
This is the Shortened URL: {}".format(tiny_url))

print("
===========Thank You for Using This Program=============")
print("
[X] Help me to update this program if you feel there is a better way to execute this idea.")
Comment

PREVIOUS NEXT
Code Example
Python :: only keep rows of a dataframe based on a column value 
Python :: django view 
Python :: box plot seaborn python 
Python :: python relative file path doesnt work 
Python :: install python altair 
Python :: url settings 
Python :: .argsort() python 
Python :: python gui drag and drop 
Python :: pandas look for values in column with condition 
Python :: python program to add two numbers using function 
Python :: how to check current version of library in python 
Python :: delete key value in dictionary python 
Python :: python replace all in list 
Python :: loop through dataframe column and return unique value 
Python :: last index in python 
Python :: python count array length 
Python :: get the last element from the list 
Python :: try catch in python 
Python :: python pandas give column names 
Python :: write binary file in python 
Python :: how to define function in python 
Python :: how to execute bash commands in python script 
Python :: how to write in a text file python 
Python :: args kwargs python 
Python :: get dictionary value python 
Python :: python bar plot groupby 
Python :: remove character(s)from each column in dataframe 
Python :: pandas dataframe column based on another column 
Python :: catalan number 
Python :: isdigit python 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =