Skip to content

Fix web_profile_info returning HTML instead of JSON - #325

Merged
mifi merged 1 commit into
masterfrom
claude/nifty-mayer-0ihhb3
Sep 11, 2026
Merged

mifi merged 1 commit into
masterfrom
claude/nifty-mayer-0ihhb3

Conversation

@mifi

@mifi mifi commented Sep 11, 2026

Copy link
Copy Markdown
Owner

The manual fallback request used the legacy i.instagram.com host, which now responds with an HTML page, so parsing failed with "Unexpected token '<', "<!DOCTYPE "... is not valid JSON". Use www.instagram.com (the host Instagram's own web client uses) and accept either host when intercepting the response.

Also validate the HTTP status and content type before parsing, so a 429 or login/challenge page produces a clear error mentioning the status instead of a cryptic SyntaxError.

Fixes #324, related #312

Claude-Session: https://claude.ai/code/session_01BFDJvmX31k6Xd82sRL7meF

The manual fallback request used the legacy i.instagram.com host, which
now responds with an HTML page, so parsing failed with
"Unexpected token '<', "<!DOCTYPE "... is not valid JSON". Use
www.instagram.com (the host Instagram's own web client uses) and accept
either host when intercepting the response.

Also validate the HTTP status and content type before parsing, so a 429
or login/challenge page produces a clear error mentioning the status
instead of a cryptic SyntaxError.

Fixes #324, related #312

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFDJvmX31k6Xd82sRL7meF
@mifi
mifi merged commit c9b6cbb into master Sep 11, 2026
5 checks passed
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.

Failed to run

2 participants