13 Interesting Python Scripts
Every day we face many programming challenges that require advanced coding. You can’t solve these problems with simple basic Python syntax. In this article, I will share 13 advanced Python scripts that can become easy-to-use tools in your project. If you don’t currently use these scripts, you can add them to your favorites for retention.
# Make web robots
This script will help you automate websites using Python. You can build a web robot that can control any website. Check out the code below. This script is very convenient in web crawling and web automation.
1 | # pip install selenium |
# Python Image Enhancement
Enhance your photos with the Python Pillow library to make them look better. In the code below, I’ve implemented four ways to enhance any photo.
1 | # pip install pillow |
# Get song lyrics
This advanced script will show you how to get lyrics from any song. First, you must get a free API key from the Lyricsgenius website, and then, you must follow the following code. This advanced script will show you how to get lyrics from any song. First, you must get a free API key from the Lyricsgenius website, and then, you must follow the following code.
1 | # pip install lyricsgenius |
# Get Exif data for photos
Use the Python Pillow module to get the Exif data of any photo. Check out the code mentioned below. I provide two methods to extract the Exif data of photos.
1 | # Get Exif of Photo |
# Search on google
You can extract Retargeting URL from Google search engine , install the following mention module and follow the code.
1 | # pip install google |
# Conversion: hexadecimal to RGB
The script will simply convert Hex to RGB . Check out the sample code below.
1 | # Conversion: Hex to RGB |
# Convert photos to Cartonize
This simple advanced script will convert your photos to Cartonize format. Check out the sample code below and give it a try.
1 | # pip install opencv-python |
# Speed Testing with Python
This advanced script helps you test your internet speed using Python. Just install the speed test module and run the following code.
1 | # pip install pyspeedtest |
# Site Status
You can use Python to check if the website is running normally. Check the following code, it displays 200, which means the website is launched. If it displays 404, it means the website is closed.
1 | # pip install requests |
# Extract OCR text from images
OCR is a method of recognizing text from numbers and scanned docs. Many developers use it to read handwritten data, and the following Python code can convert scanned images to OCR text format.
Note: You must download tesseract.exe from Github .
1 | # pip install pytesseract |
# Get Windows version
This simple script will help you get the full version of the window you are currently using.
1 | # Window Versionimport wmi |
# Convert PDF to Image
Use the following code to convert all Pdf pages into images.
1 | # PDF to Images |
# Empty Recycling Bin
This simple script allows you to empty your Recycle Bin with Python. Check out the code below to learn how.
1 | # pip install winshell |
13 Interesting Python Scripts