Python Pytube – Retrieve search results from YouTube

In this post we will be creating a Python script that will retrieve search results from YouTube, to download YouTube captions we will be using pytube which is a lightweight, Pythonic, dependency-free, library for downloading YouTube Videos. The library is very easy to use and quite intuitive. The project will take queries via user inputContinue reading “Python Pytube – Retrieve search results from YouTube”

Python Random – Number guessing game

In this post we will be creating a number guessing game in python, the script will make use of the the random module for which the ‘randint’ function which will return a random integer within our given range. The game will have the following logic – We start by generating a random integer. The scriptContinue reading “Python Random – Number guessing game”

Python Random – Dice rolling simulator

In todays post we will be creating a script in Python that will simulate the rolling of a dice, to do this we will be using the random module which enables us to a random number generator. The script will make use of the ‘randint’ function which will return a random integer within our givenContinue reading “Python Random – Dice rolling simulator”

Python pyzbar – Decoding QR codes

In this post we will be creating a Python script that will decode QR codes. We will be using pyzbar which is a library used for reading one-dimensional barcodes and QR codes. Below is the QR code we will be decoding which is for the Scriptopia website. The source code for this project can beContinue reading “Python pyzbar – Decoding QR codes”

Python Lists – Removing all instances of a variable in list

In this post we will be creating a script in Python that will remove all instances of an item from within. Lists in Pyhon provide a means of storing multiple items into a single variable. We start by creating a list which can be seen below. In this example we will be removing all instancesContinue reading “Python Lists – Removing all instances of a variable in list”

Python Pyperclip – Copying text to clipboard

In this post we will be creating a script that will copy output to the clipboard. To do this we will use the pyperclip module which enables us to copy and past clipboard functions.  In this example we will be taking text via input and copying it to the clipboard, with a success message onceContinue reading “Python Pyperclip – Copying text to clipboard”

Python pytrends – Get real-time trending searches from Google

In this post we will be retrieving real-time trending search queries from Google using the pytrends API. The pytrends API allows simple interface for automating downloading of reports from Google Trends. The real-time trending search function of the API will take a location and so this can be changed as appropriate. The script will alsoContinue reading “Python pytrends – Get real-time trending searches from Google”

Python qrcode – Generating QR codes

In this post we will be creating a script in Python that will generate QR codes, to do this we will be using the qrcode module which generates QR code images. The module comes along with Pillow, which is a Python imaging library. This will enable us to save the QR codes as separate imagesContinue reading “Python qrcode – Generating QR codes”