Skip to content

trigun6187/igsvr2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Instagram Video Downloader

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.

Features

  • Download Instagram videos from any public post URL
  • Simple, clean interface
  • Backend powered by Python and Instaloader
  • Frontend hosted statically on GitHub Pages

Architecture

  • 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

Setup Instructions

Prerequisites

  • Python 3.7+
  • pip (Python package manager)
  • Git (for cloning the repository)

Backend Setup (Local Computer)

  1. Clone this repository to your local computer:

    git clone <repository-url>
    cd instagram-video-downloader
  2. Install the required Python dependencies:

    pip install -r requirements.txt
  3. Start the backend server:

    python server.py

    The server will run on http://localhost:5000

Frontend Deployment (GitHub Pages)

  1. Push this repository to GitHub
  2. Go to your repository settings on GitHub
  3. Navigate to the "Pages" section
  4. Set the source to the main branch (or master) and the / (root) folder
  5. GitHub will provide you with a URL where your site is published

Usage

  1. Make sure your local backend server is running (python server.py)
  2. Visit your GitHub Pages site (e.g., https://yourusername.github.io/instagram-video-downloader/)
  3. Enter an Instagram video URL in the input field
  4. Click "Download Video"
  5. If successful, a download link will appear - click it to download the video

How It Works

  1. The frontend (index.html) sends the Instagram URL to the backend via a POST request to /download
  2. 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
  3. The backend returns a URL to download the video file
  4. The frontend creates a download link for the user

Important Notes

CORS Considerations

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:

  1. The backend server includes basic CORS handling in the Flask app
  2. For development, you can run both frontend and backend locally
  3. For production use with GitHub Pages, you may need to use a proxy or adjust your browser settings

Security

  • 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

Limitations

  • Only works with public Instagram posts
  • Requires the backend server to be running
  • Video files are temporarily stored on your local machine

Troubleshooting

Backend Not Running

If you see connection errors, make sure:

  1. You've started the backend with python server.py
  2. The server is running on port 5000
  • Check for any error messages in the terminal

Invalid URL Errors

Ensure you're entering a valid Instagram post URL, such as:

  • https://www.instagram.com/reel/XXXXXX/
  • https://www.instagram.com/p/XXXXXX/

Video Not Found

  • The post might be private
  • The post might not contain a video
  • Instagram might have changed their URL structure

Files in This Repository

  • index.html - The frontend website
  • server.py - The Python Flask backend server
  • requirements.txt - Python dependencies
  • README.md - This file

License

This project is for educational purposes only. Please respect Instagram's Terms of Service and only download content you have the right to access.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors