This project is a Discord bot that fetches the total number of views from an Instagram reel using Selenium driverless module.
- Scrapes Instagram to fetch the total number of views on a reel.
- Uses Selenium WebDriver to automate the login process and navigate Instagram.
- The bot is command-driven on Discord and responds to the
?views <Instagram Reel URL>
command with the view count.
- Python 3.8+ is required to run this project.
- Discord API Token for creating and managing the bot.
- Instagram Credentials (username and password) to log in and retrieve data.
- Google Chrome must be installed for the Selenium driverless library.
The project uses the following key libraries:
- discord.py: For interacting with Discord.
- selenium-driverless: For web scraping Instagram views.
- python-dotenv: For securely storing and loading environment variables.
git clone https://github.com/killuazoldyckreal/Instagram-Counter.git
cd Instagram-Counter
You can install the necessary Python libraries using the following command:
pip install -r requirements.txt
Create a .env
file in the root directory and add your Instagram credentials and Discord bot token:
USER=<your_instagram_username>
PASS=<your_instagram_password>
TOKEN=<your_discord_bot_token>
To start the bot, run the following command:
python main.py
- Invite the bot to your Discord server.
- In a text channel, type
?views <Instagram Reel URL>
. - The bot will respond with the total number of views for that reel.
Example:
?views https://www.instagram.com/woodsbetzz/reels/
- The bot may encounter Instagram's rate-limiting restrictions, which can temporarily block requests.
- This bot uses basic Instagram scraping, which can break if Instagram changes its layout or structure.
Feel free to open issues or submit pull requests to improve the bot or fix bugs.
This project is licensed under the MIT License. See the LICENSE file for details.