
A powerful Telegram bot that allows users to download content from Instagram and YouTube platforms with ease.
This bot provides a user-friendly interface with inline keyboards and supports various content types including reels, posts, stories, profile photos, and YouTube videos/audio.
- ๐๏ธ Reels: Download Instagram reels in high quality
- ๐ธ Posts: Download Instagram posts (single/multiple images)
- ๐ Stories: Download Instagram stories
- ๐ค Profile Photos: Download profile pictures in full resolution
- ๐ Analytics: Get detailed profile analytics and download statistics
- ๐ Video Links: Generate download links for YouTube videos
- ๐น Video Files: Download YouTube videos and shorts directly (up to 50MB)
- ๐ต Audio Only: Extract and download audio from YouTube videos
- ๐ Analytics: Track download statistics
- ๐ Real-time Statistics: Track usage and download counts
- ๐ URL Shortening: Automatic URL shortening and masking
- โก Background Mode: Run bot 24/7 in background
- ๐ก๏ธ Error Handling: Robust error handling and user feedback
- ๐ฑ Responsive UI: Clean inline keyboard interface
- Python 3.13.3 or higher
- Windows OS (for batch file management)
- Telegram Bot Token (from @BotFather)
-
Clone or Download the project to your local machine
-
Navigate to the project directory:
-
Run the Bot Manager:
Reels-Shorts.bat
-
Configure Bot Token:
- Select option
[4] Configure Bot Token
- Enter your Telegram Bot Token from @BotFather
- The token will be automatically saved to
telegram_config.json
- Select option
-
Start the Bot:
- Select option
[1] Start Bot 24/7 (Background Mode)
- The bot will automatically install dependencies and start running
- Select option
If you prefer manual setup:
-
Install Python Dependencies:
pip install -r requirements.txt
-
Configure Bot Token: Create
telegram_config.json
with your bot token:{"token": "YOUR_BOT_TOKEN_HERE"}
-
Run the Bot:
double click on bat file
The bot uses the following Python packages:
pyTelegramBotAPI==4.15.4 # Telegram Bot API
requests==2.31.0 # HTTP requests
pytube==15.0.0 # YouTube downloader
instaloader==4.10.2 # Instagram content loader
instagrapi>=2.1.0 # Instagram API
yt-dlp>=2023.12.30 # YouTube/media downloader
httpx>=0.25.0 # Async HTTP client
pyshorteners>=1.0.1 # URL shortening
- Start a conversation with your bot on Telegram
- Send
/start
to see the main menu
Instagram:
https://www.instagram.com/p/xxx/
(Posts)https://www.instagram.com/reel/xxx/
(Reels)https://www.instagram.com/stories/username/xxx/
(Stories)@username
orhttps://www.instagram.com/username/
(Profile)
YouTube:
https://youtube.com/watch?v=xxx
https://youtu.be/xxx
https://m.youtube.com/watch?v=xxx
The project includes a comprehensive bot management system:
- Start Bot: Launch bot in background mode
- Stop Bot: Safely stop the running bot
- Check Status: View current bot status
- Configure Token: Set up or update bot token
- Exit: Close the manager
start_bot_background.bat
: Start bot in background modestop_bot.bat
: Stop the running botcheck_bot.bat
: Check if bot is running
๐ฆ Instagram Telegram Bot
โโโ ๐ main.py # Main bot application
โโโ ๐ requirements.txt # Python dependencies
โโโ ๐ telegram_config.json # Bot token configuration
โโโ ๐ bot_manager.bat # Bot management interface
โโโ ๐ bot_scripts/ # Bot management scripts
โ โโโ ๐ start_bot_background.bat
โ โโโ ๐ stop_bot.bat
โ โโโ ๐ check_bot.bat
โโโ ๐ configuration/ # Bot modules
โ โโโ ๐ __init__.py # Configuration loader
โ โโโ ๐ stats.py # Statistics management
โ โโโ ๐ instagram_reel.py # Instagram reels handler
โ โโโ ๐ instagram_post.py # Instagram posts handler
โ โโโ ๐ instagram_stories.py # Instagram stories handler
โ โโโ ๐ instagram_profile_photo.py # Profile photo handler
โ โโโ ๐ instagram_profile_analytics.py # Profile analytics
โ โโโ ๐ instagram_caption.py # Caption extraction
โ โโโ ๐ youtube_video.py # YouTube video handler
โ โโโ ๐ youtube_music.py # YouTube audio handler
โ โโโ ๐ session_id.json # Session management
โ โโโ ๐ stats.json # Usage statistics
โโโ ๐ README.md # This file
The bot automatically handles most configuration, but you can customize:
- API Settings: Edit
configuration/__init__.py
for API endpoints - Download Paths: Modify download directories in respective modules
- Rate Limits: Adjust request delays in configuration files
- Statistics: Configure tracking in
configuration/stats.py
- Instagram sessions are managed automatically
- Session data is stored in
configuration/session_id.json
- Sessions are refreshed as needed to maintain functionality
Bot Token Error:
- Ensure your token is correctly configured in
telegram_config.json
- Verify the token is active and valid from @BotFather
Download Failures:
- Check if the content is public and accessible
- Verify the URL format is correct
- Some private content may not be downloadable
Python Not Found:
- Ensure Python 3.13.3+ is installed and added to PATH
- Try running
python --version
in command prompt
Dependencies Issues:
- Run
pip install -r requirements.txt
manually - Check for any error messages during installation
- Run bot in background mode for 24/7 operation
- Monitor system resources for heavy usage
- Regular restart recommended for optimal performance
- Bot tokens are stored locally and encrypted
- No user data is permanently stored
- Download links are automatically shortened and masked
- Session data is managed securely
This project is for educational purposes. Please respect platform terms of service and copyright laws when using this bot.
For issues or questions:
- Check the troubleshooting section
- Review error messages carefully
- Ensure all dependencies are properly installed
- Verify bot token configuration
โก Quick Start: Run bot_manager.bat
โ Configure Token โ Start Bot โ Enjoy! ๐