Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Outline

🔗 URL Shortener

A simple Python URL Shortener that converts long URLs into short, shareable links using the TinyURL service.


🗒️ Description

This project allows users to shorten long URLs into compact, shareable links. It validates the entered URL, generates a shortened link using TinyURL, and automatically opens the shortened URL in the default web browser.


✨ Features

  • 🔗 Shorten any valid URL
  • ✅ URL validation
  • 🌐 Automatically opens the shortened URL
  • ⚡ Fast and lightweight
  • 💻 Command-line application

📋 Required Modules

This project requires the following Python packages:

  • pyshorteners
  • validators

📦 How to Install Required Modules

Install the required packages using pip:

pip install pyshorteners validators

▶️ How to Run the Script

Clone the Repository

git clone https://github.com/ShravanDalavi/Simple-Python-Mini-Projects.git

Navigate to the Project Folder

cd "Simple-Python-Mini-Projects/URL Shortener"

Run the Script

python url_shortener.py

💻 Example

Enter Long URL:
https://github.com/ShravanDalavi/Simple-Python-Mini-Projects

✅ URL Shortened Successfully!

Short URL:
https://tinyurl.com/2ykbty3a

Morty Proxy This is a proxified and sanitized view of the page, visit original site.