A simple website that allows you to download videos from Instagram using a URL. The frontend is hosted on GitHub Pages, and the backend runs on your local computer.
- Download Instagram videos from any public post URL
- Simple, clean interface
- Backend powered by Python and Instaloader
- Frontend hosted statically on GitHub Pages
- Frontend: Static HTML/JavaScript hosted on GitHub Pages
- Backend: Python Flask server running on your local machine
- Communication: Frontend makes AJAX requests to the local backend
- Python 3.7+
- pip (Python package manager)
- Git (for cloning the repository)
-
Clone this repository to your local computer:
git clone <repository-url> cd instagram-video-downloader
-
Install the required Python dependencies:
pip install -r requirements.txt
-
Start the backend server:
python server.py
The server will run on
http://localhost:5000
- Push this repository to GitHub
- Go to your repository settings on GitHub
- Navigate to the "Pages" section
- Set the source to the
mainbranch (ormaster) and the/ (root)folder - GitHub will provide you with a URL where your site is published
- Make sure your local backend server is running (
python server.py) - Visit your GitHub Pages site (e.g.,
https://yourusername.github.io/instagram-video-downloader/) - Enter an Instagram video URL in the input field
- Click "Download Video"
- If successful, a download link will appear - click it to download the video
- The frontend (index.html) sends the Instagram URL to the backend via a POST request to
/download - The backend (server.py) uses Instaloader to:
- Extract the shortcode from the Instagram URL
- Download the corresponding post
- Extract the video file if it's a video post
- The backend returns a URL to download the video file
- The frontend creates a download link for the user
Since the frontend is hosted on GitHub Pages and the backend runs locally on your machine, you may encounter CORS (Cross-Origin Resource Sharing) issues. To resolve this:
- The backend server includes basic CORS handling in the Flask app
- For development, you can run both frontend and backend locally
- For production use with GitHub Pages, you may need to use a proxy or adjust your browser settings
- This application is designed for personal use
- The backend server should only be accessible from trusted networks
- Do not expose the backend server to the public internet without proper security measures
- Only works with public Instagram posts
- Requires the backend server to be running
- Video files are temporarily stored on your local machine
If you see connection errors, make sure:
- You've started the backend with
python server.py - The server is running on port 5000
- Check for any error messages in the terminal
Ensure you're entering a valid Instagram post URL, such as:
https://www.instagram.com/reel/XXXXXX/https://www.instagram.com/p/XXXXXX/
- The post might be private
- The post might not contain a video
- Instagram might have changed their URL structure
index.html- The frontend websiteserver.py- The Python Flask backend serverrequirements.txt- Python dependenciesREADME.md- This file
This project is for educational purposes only. Please respect Instagram's Terms of Service and only download content you have the right to access.