This is a complete modernization of the Osintgram project, featuring:
- Modern GUI built with PyQt5
- Advanced Instagram API using multiple scraping methods
- No dependency on outdated instagram_private_api
- Multiple API backends for maximum reliability
- Real-time progress tracking and error handling
-
Advanced Instagram API (
src/advanced_instagram_api.py)- Combines Instaloader, Selenium, and Instascrape
- Automatic fallback between methods
- Handles rate limits and errors gracefully
-
Modern Osintgram (
src/modern_osintgram.py)- Clean wrapper around the advanced API
- Command-compatible with original Osintgram
- GUI-friendly return formats
-
Modern GUI (
modern_gui.py)- Full PyQt5 interface
- Multi-threaded operations
- Multiple output views (Console, Table, JSON)
- Challenge handling dialogs
| Feature | Instaloader | Selenium | Instascrape | Status |
|---|---|---|---|---|
| User Info | ✅ | ✅ | ✅ | Working |
| Posts | ✅ | ✅ | ❌ | Partial |
| Followers | ✅ | ❌ | ❌ | Login Required |
| Following | ✅ | ❌ | ❌ | Login Required |
| Hashtags | ✅ | ❌ | ❌ | Working |
| Post Details | ✅ | ❌ | ❌ | Working |
# Core requirements
pip install PyQt5>=5.15.0
pip install requests
pip install beautifulsoup4
# Instagram API backends (install at least one)
pip install instaloader # Recommended
pip install selenium undetected-chromedriver webdriver-manager
pip install instascrape # Basic supportgit clone <your-repo>
cd osintgram
pip install -r requirements.txt
python launch_modern_gui.pypython launch_modern_gui.pyThe GUI provides:
- Login dialog for Instagram credentials
- Target user selection
- Command buttons organized by category
- Real-time output in multiple formats
- Progress tracking and error handling
python test_modern_api.pyAll original Osintgram commands are supported:
| Command | Description | Status |
|---|---|---|
info |
User information | ✅ Working |
photos |
User posts/photos | |
followers |
User followers | ✅ Login required |
following |
Users being followed | ✅ Login required |
hashtag |
Hashtag search | ✅ Working |
propic |
Profile picture | ✅ Working |
stories |
User stories | 🚧 Planned |
comments |
Post comments | 🚧 Planned |
tagged |
Tagged photos | 🚧 Planned |
-
User Information Retrieval
- Username, full name, biography
- Follower/following counts
- Post counts, verification status
- Profile picture URLs
-
Public Data Access
- No login required for public profiles
- Automatic rate limit handling
- Multiple API fallbacks
-
Modern GUI
- Dark theme interface
- Organized command layout
- Real-time progress updates
- Multiple output formats
-
Error Handling
- Graceful API failures
- User-friendly error messages
- Automatic retry mechanisms
-
Posts Retrieval
- Works but may hit rate limits
- Instagram has tightened access
- Requires careful usage
-
Private Account Access
- Requires valid Instagram login
- Subject to Instagram's terms
- May trigger challenges
- Stories Support
- Comment Analysis
- Tagged Photos
- Location Data
- Network Analysis
The modern implementation uses a multi-tier approach:
- Primary: Instaloader (most reliable for public data)
- Secondary: Selenium with undetected Chrome (for complex interactions)
- Fallback: Direct HTTP requests with session management
- Automatic delays between requests
- Exponential backoff on errors
- User-configurable limits
- API rotation on failures
- Credentials stored locally only
- No data transmission to third parties
- Challenge handling through browser
- Session management
-
"JSON parsing error"
- Fixed in v2.0 with modern APIs
- No longer uses outdated instagram_private_api
-
"403 Forbidden" errors
- Instagram rate limiting
- Try again after a few minutes
- Use different API method
-
Selenium Chrome issues
- Install Chrome browser
- Update undetected-chromedriver
- Check Chrome version compatibility
-
Login challenges
- Use browser login dialog
- Handle 2FA if enabled
- Wait for Instagram approval
python debug_gui.py # Enhanced error tracking
python test_modern_api.py # API functionality testosintgram/
├── modern_gui.py # Main GUI application
├── launch_modern_gui.py # GUI launcher
├── test_modern_api.py # API tests
├── src/
│ ├── advanced_instagram_api.py # Core API implementation
│ ├── modern_osintgram.py # Command wrapper
│ └── gui_credentials.py # Credential management
├── config/
│ └── credentials.ini # User credentials
└── requirements.txt # Dependencies
- Implement method in
AdvancedInstagramAPI - Add wrapper in
ModernOsintgram - Update command mapping
- Add GUI button and handler
The modular design allows easy addition of new Instagram API methods:
def new_feature(self, params):
"""New Instagram feature."""
# Try each available API method
if self.use_instaloader:
result = self._new_feature_instaloader(params)
if result: return result
if self.use_selenium:
result = self._new_feature_selenium(params)
if result: return result
return None- Respect Instagram's Terms of Service
- Obtain proper authorization before investigating
- Use for legitimate security research only
- Respect privacy and data protection laws
- Do not use for harassment or stalking
- Issues: Report bugs and feature requests
- Documentation: Check this README and code comments
- Testing: Use
test_modern_api.pyfor debugging - Logs: Check
logs/directory for detailed error information
- Complete rewrite with modern APIs
- PyQt5 GUI interface
- Multi-API backend support
- Improved error handling
- Rate limit management
- Challenge handling system
- Original CLI implementation
- instagram_private_api dependency
- Basic command set
- Instagram Basic Display API integration
- Advanced network analysis features
- Export formats (CSV, JSON, PDF)
- Batch processing capabilities
- Plugin system for extensions
- Web interface option