Skip to content

[pull] master from scrapinghub:master - #29

Merged
pull[bot] merged 3 commits into
zanachka:masterfrom
scrapinghub:master
Sep 27, 2026
Merged

pull[bot] merged 3 commits into
zanachka:masterfrom
scrapinghub:master

Conversation

@pull

@pull pull Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

alexldide and others added 3 commits September 27, 2026 16:05
Closes #87.

Pages sometimes append junk to an otherwise valid value, most often a
stray closing brace or semicolon, and the whole script was discarded
over it.

Whatever parses from the start of the script is now kept, using
raw_decode, and the remainder is dropped with a warning naming how
many characters were ignored. Since raw_decode reports where it
stopped, this also picks up several values concatenated in one script,
which previously failed as "Extra data".

Truncated or wholly unparsable input still raises, so this only
salvages scripts that do begin with a complete value.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Closes #171.

Escape sequences that are legal in a JavaScript string literal but not
in JSON find their way into JSON-LD, and the script was discarded with
"Invalid \escape". The reports involve apostrophes in names, reaching
extruct as either \' or \x27.

When the plainer parses have failed, escape sequences are now
rewritten: \' becomes ', \x27 and friends become the equivalent
\uXXXX, and any other backslash is doubled rather than dropped, so an
unescaped Windows path or regular expression keeps its characters
instead of losing them.

Escapes are matched as a unit, so a "\\" pair is consumed whole and
its second backslash is not mistaken for the start of another escape.
Valid escapes are left untouched, which makes this a no-op on
well-formed JSON; the repair is only attempted after a normal parse
has already failed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Sep 27, 2026
@pull pull Bot added the ⤵️ pull label Sep 27, 2026
@pull
pull Bot merged commit e58c267 into zanachka:master Sep 27, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant