Skip to content

Fix: robust Nitter URL handling + safe Instagram requests (timeouts, no crash)#2

Open
TheDudeXxXx wants to merge 1 commit intoGreyjedix:mainfrom
TheDudeXxXx:fix/nitter-instagram-error-handling
Open

Fix: robust Nitter URL handling + safe Instagram requests (timeouts, no crash)#2
TheDudeXxXx wants to merge 1 commit intoGreyjedix:mainfrom
TheDudeXxXx:fix/nitter-instagram-error-handling

Conversation

@TheDudeXxXx
Copy link

@TheDudeXxXx TheDudeXxXx commented Aug 9, 2025

Prevents hangs & crashes in Nitter/Instagram lookups by adding scheme validation, timeouts, and graceful failover. Scans now finish even if an endpoint is flaky.

Changes

Twitter/Nitter

  • Force https:// scheme if missing
  • Add timeouts + try/except
  • Skip unreachable instances without stalling

Instagram

  • Use requests.Session() with UA header
  • Add timeouts
  • Gracefully handle exceptions

Testing

Verified:

  • No MissingSchema crashes from missing schemes
  • Timeouts prevent hangs on unreachable instances
  • Instagram lookups run without blocking or throwing UnboundLocalError
  • Multiple scans complete cleanly despite flaky endpoints

Impact

  • Increased scan stability and speed
  • Eliminates manual restarts due to endpoint failures
  • No breaking changes — only safer request handling and minor URL validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant