URL SHORTENER USING PYTHON

It's a script that takes a list of URLs as command-line arguments and uses the TinyURL API to generate shortened URLs for each input URL.

screenshot5

Technology Used:

The code uses Python for scripting and URL manipulation.
It utilizes the TinyURL API to create shortened URLs, which is a web service.
The code supports different Python versions by using conditional imports. 
 

Working Process:

It executes the script from the command line via passing a list of URLs as arguments. Where it calls the main function to process each input URL.
 
To generate URLs used a service and TinyURLs are generated for each input URL and printed to the console. For that defined a make_tiny function to generate TinyURLs.
 
It constructs a request URL to the TinyURL API with the input URL as a query parameter.
 
So for each URL, call the make_tiny function to generate a TinyURL.There by prints the TinyURL to the console.
 
If you click the generated link you see the same output as the original URL shows.
 
 

Output:

The script's output consists of the shortened TinyURLs corresponding to the input URLs.
Users can use these TinyURLs to share more concise links to the original URLs.

Project Files

Loading...
..
This directory is empty.

Comments (0)

Leave a Comment