Giphy GIF Downloader
This script downloads GIFs from Giphy pages. You provide a list of Giphy URLs, and the script will scrape the page to find the direct GIF link and download it.
How It Works
The script reads a list of Giphy page URLs from links.txt, then visits each page to find the direct .gif image URL. It then downloads the GIF and saves it into the downloaded_gifs directory, using the GIF's unique ID as the filename.
Requirements
- Python 3
requestslibrarybeautifulsoup4library
Installation
-
Clone the repository or download the files.
-
Install the required Python libraries:
pip install requests beautifulsoup4
Usage
-
Add Giphy URLs to
links.txt: Open thelinks.txtfile and add the Giphy page URLs you want to download. Each URL should be on a new line.Example
links.txt:https://giphy.com/gifs/hello-hi-hey-l41lZxzroU33typuU https://giphy.com/gifs/cat-computer-hacker-J1G7rIvoyz4cwaqXWo -
Run the script: Execute the Python script from your terminal:
python giphy-downloader.py -
Find your GIFs: The script will create a
downloaded_gifsdirectory (if it doesn't already exist) and save all the downloaded GIFs there.
File Structure
.
├── giphy-downloader.py # The main Python script
├── links.txt # Your list of Giphy URLs
└── downloaded_gifs/ # Directory where GIFs are saved