Commit Graph
13 Commits
Author SHA1 Message Date
smolkik_adm c786adc079 feat: skip posts older than 24h on first run
- Add MAX_POST_AGE_HOURS config (default 24)
- Filter posts by taken_at timestamp
- Stop fetching when hitting old posts (Instagram returns newest first)
- .env: MAX_POST_AGE_HOURS=24
2026-06-17 12:24:58 +07:00
smolkik_adm 179605e9b5 feat: add debug logging for stories endpoint
- Log when new stories are found per user
- Log HTTP status for non-200/404 responses
- Show count of new stories
2026-06-17 12:23:01 +07:00
smolkik_adm 37b895d84f fix: login via followees endpoint instead of /users/self/info/
- Login check uses /friendships/{ds_user_id}/following/ (works reliably)
- Store own_user_id from cookies to avoid extra API call
- Skip separate user info fetch
2026-06-17 12:07:27 +07:00
smolkik_adm cb2461ace4 fix: correct Instagram private API endpoints
- /users/self/info/ for profile info (not /accounts/current_user/)
- /friendships/{user_id}/following/ for followees list
- Added own_user_id fetch before followees
- Better debug logging for response structure
2026-06-17 12:05:34 +07:00
smolkik_adm 1bd68c9a0e rewrite: switch from instaloader to Instagram Private API
instaloader blocked by Instagram GraphQL 403. Using mobile API instead:
- i.instagram.com/api/v1 endpoints (same as Android app)
- Direct cookie loading from cookies.txt
- Stories, posts, albums, videos
- Random delays between requests
- Removed instaloader dependency, using requests directly
2026-06-17 12:02:51 +07:00
smolkik_adm bc1649d0ac fix: remove RateController that requires context arg 2026-06-17 12:00:06 +07:00
smolkik_adm c119b28e4d fix: add mobile user-agent and random delays to bypass Instagram anti-bot
- iPhone Safari user-agent + X-IG-App-ID header
- 2-6s random delay between profile checks
- 1-3s delay between media downloads
- RateController for built-in throttling
- Try/except per followee to not stop on errors
2026-06-17 11:58:02 +07:00
smolkik_adm 0faebcd41b fix: verify session belongs to expected account before using
- Add _verify_session() to check profile exists after loading session
- Skip session files from wrong accounts
- Clear cookies before trying next auth method
2026-06-17 11:53:32 +07:00
smolkik_adm ad7ab58eb1 feat: better diagnostics for profile and cookie verification
- Show which account cookies belong to (ds_user_id)
- Catch ProfileNotExistsException with clear error
- Log profile info on successful fetch
2026-06-17 11:51:43 +07:00
smolkik_adm b566708746 fix: correct session and cookies file paths
- Session file: check /data/session-ig, /data/downloads/session-ig
- Cookies: check /data/cookies.txt and /data/downloads/cookies.txt
- Fix docker-compose SESSION_FILE path
2026-06-17 11:47:20 +07:00
smolkik_adm 78217432b6 fix: better diagnostics for cookie auth failures
- Detect missing sessionid cookie and log clear error
- Improved instructions for both auth methods
2026-06-17 11:40:27 +07:00
smolkik_adm b1aa0eb6f5 fix: support cookie-based auth, direct login often blocked by Instagram
- Try instaloader session file first
- Then cookies.txt (Mozilla format from browser extension)
- Then cookies.json (from browser extensions)
- Direct login as last resort with clear instructions
2026-06-17 11:37:53 +07:00
smolkik_adm 6c51413d12 feat: Telegram bot for Instagram monitoring via instaloader
- aiogram 3 bot with commands /start /check /status /stop
- InstagramMonitor: periodic check of followees stories and posts
- Docker deployment with docker-compose
- State tracking to avoid duplicate sends
- Auto-cleanup of old media files
2026-06-17 11:30:13 +07:00