Powering open-source intelligence... Need more energy to sustain the mission.
Access link → saweria.co/mipostify
IG Comment Extractor is a simple Python-based tool to extract comments from Instagram posts (Reels, Feed) and merge them into a single file. Perfect for social media research, sentiment analysis, and other data needs.
- 🔗 Extract comments from multiple Instagram URLs
- 🗂️ Automatically save comments into
feeds/andreels/folders - 📄 Merge all comments into a single text file
- 🎨 Interactive terminal interface using
coloramaandtqdm
.
├── 2file.py # Main script to extract Instagram comments
├── cookie.py # Contains session/cookie data from Instagram
├── gabung.py # Script to merge all extracted comments
├── requirements.txt # Python dependencies
├── output_comments/
│ ├── feeds/ # Comments from feed posts
│ └── reels/ # Comments from reels
└── output_file/ # Final merged comment files
- Clone the repository
git clone https://github.com/HilmiAlawi/IG-Comment-Extractor.git
cd IG-Comment-Extractor- Install dependencies
pip install -r requirements.txt- Prepare the
cookie.pyfile
Fill in your Instagram session cookie data:
sessionid = "YOUR_SESSION_ID"
ds_user_id = "YOUR_USER_ID"
csrftoken = "YOUR_CSRF_TOKEN"
mid = "YOUR_MID"python 2file.py- Paste one or more Instagram post URLs (feed/reel)
- Press
Enterafter each URL - Type
donewhen finished
Comments will be saved automatically in output_comments/feeds or output_comments/reels.
python gabung.py- Enter the desired output file name
- The merged file will be saved in
output_file/
- You must be logged in to Instagram in a browser to get your cookie.
- Make sure the cookie is still valid and active.
- This tool is not officially affiliated with Instagram. Use responsibly.
- 📊 Social media sentiment analysis
- 🧪 Academic research or thesis
- 💼 Digital marketing and brand monitoring
This project is licensed under the MIT License.
© 2025 Hilmi Alawi
📍 Tasikmalaya
🎥 Photo & Video • 📢 Event Organizer • 📲 Digital Marketing • 📱 Social Media Handling
███╗ ███╗██╗██████╗ ██████╗ ███████╗████████╗██╗███████╗██╗ ██╗
████╗ ████║██║██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝██║██╔════╝╚██╗ ██╔╝
██╔████╔██║██║██████╔╝██║ ██║███████╗ ██║ ██║█████╗ ╚████╔╝
██║╚██╔╝██║██║██╔═══╝ ██║ ██║╚════██║ ██║ ██║██╔══╝ ╚██╔╝
██║ ╚═╝ ██║██║██║ ╚██████╔╝███████║ ██║ ██║██║ ██║
╚═╝ ╚═╝╚═╝╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
If you find this tool useful, don't forget to ⭐ star the repo on GitHub!