This is a Telegram bot built with Aiogram 2.25 that allows users to download videos from Instagram and TikTok using APIs. The bot can be deployed with either webhook or non-webhook methods.
- Download videos from Instagram and TikTok via APIs.
- Supports both webhook and polling (non-webhook) setup methods.
- Written in Python using the Aiogram 2.25 framework.
- Python 3.8+
- Aiogram 2.25
- [Other required libraries (list them here if any)]
-
Clone the repository:
git clone https://github.com/bekiake/instagram_downloader_bot.git cd instagram_downloader_bot -
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory and add the following variables:BOT_TOKEN=your_bot_token API_KEY_INSTAGRAM=your_instagram_api_key API_KEY_TIKTOK=your_tiktok_api_key
To run the bot using the polling method, simply run:
python bot.pyTo run the bot with webhook support, you need to configure a few more settings.
-
Ensure HTTPS Server: Make sure you have an HTTPS server set up. You can use tools like ngrok or any other server with SSL.
-
Update the Environment Variable: In your
.envfile, update theWEBHOOK_URLto your server's URL:WEBHOOK_URL=https://yourdomain.com/webhook
-
Run the webhook setup:
python webhook_bot.py
Feel free to fork the repository, create a new branch, and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.