Download the PHP package pira/instagram without Composer
On this page you can find all versions of the php package pira/instagram. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pira/instagram
More information about pira/instagram
Files in pira/instagram
Package instagram
Short Description Telegram Instagram-DL bot based on MadelineProto
License MIT
Informations about the package instagram
Instagram-DL Telegram Bot
Welcome to the Instagram-DL Telegram Bot project! This bot allows you to download Instagram videos by simply sending a link through Telegram. It's built using MadelineProto.
Features
- Download Instagram videos by sending the link to the bot.
- Automatically handles valid URL checking.
- Provides progress updates during the download process.
Installation
Requirements
- PHP 8.2 or higher
- Composer (optional, but recommended)
Setup
Method 1: Using Git and Composer
-
Clone the repository:
-
Install dependencies:
- Run the bot:
Method 2: Using Composer Project Creator
-
Create the project:
-
Navigate to the project directory:
- Run the bot:
Method 3: Running bot.php Only
-
Download the
bot.php
file: - Run the bot:
Usage
Once the bot is running, you can interact with it on Telegram. Here are some basic commands:
-
Start the bot:
- Send an Instagram link: Simply paste the Instagram video link into the chat, and the bot will download and send the video back to you.
Project Structure
src/YTDL.php
: This file contains the logic for handling the download requests from Instagram.bot.php
: The main entry point for running the Telegram bot.
Code Overview
Event Handlers
The bot uses event handlers to process commands and incoming messages. Here are some key components:
- cmdStart: Handles the
/start
command and sends a welcome message. - cmdProcessUrl: Processes the Instagram URL sent by the user, validates it, and initiates the download process.
- cmdUpload: Manages the file upload process, providing progress updates.
Main Function
The main
function initializes the bot settings and starts the bot loop:
License
This project is licensed under the MIT License. See the LICENSE file for details.
Authors
- Hossein Pira - [email protected]
Acknowledgments
- This bot is built using MadelineProto.
Integration with PHP YTDL Library
This bot utilizes the YTDL class from the PHP YTDL Library to handle video downloads. Here is an overview of the YTDL class:
YTDL Class
The YTDL class handles the configuration and sending of requests to a video downloading API. It allows you to set various parameters for downloading videos or audio, such as video quality, codec, audio format, and filename pattern. The class provides methods to enable or disable specific features like audio-only downloads, full audio from TikTok videos, and metadata options.