Watch on YouTube: URL Shortener using Python
We often need to share some links with our friends or anyone, but sometimes those links are very long and are not readable. So we need to shorten that URL to get a clean, minimal look. But how it is, if you could create your own URL Shortener using Python?
For this application, we will need two Python modules,
- pyshorteners: Pyshorteners is a Python library that helps you shorten URLs using the most famous URL Shorteners available.
- Tkinter: Tkinter is a standard library in Python which is used for GUI applications. Tkinter is the native library. You don’t need to install it externally; just import it while you use it, just like any other python module.
When you run the above .py file, you will get such kind of output. Enter any URL in the first row and press the convert button & that’s it, your python code will generate a shortened URL for you. Watch YouTube Video
Note: This application will only run until you’re connected to the internet. As it needs to fetch APIs; It will not work in offline mode.