summaryrefslogtreecommitdiff
path: root/gradle
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-22 20:11:09 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-22 20:11:09 +0000
commitee019c91f66b6ba35b7295ea01220c6c13819b1c (patch)
tree19c4fa73acb6e9a5e8cc6cac71526cb2b22c3aca /gradle
parent7b0be4757356af46df1eb55d596f819c21b00f3e (diff)
Un-hide CSS-gated content before running Readability
Some "soft" paywalls (West Hawaii Today's included) deliver the full article in the initial HTML response to every visitor, then hide it with CSS (inline or via stylesheet) pending a client-side subscription check -- the content itself isn't withheld by the server, only its visibility. Readability has a built-in heuristic that skips anything hidden this way, treating it as boilerplate, which is exactly what was discarding real, already-delivered article text and leaving only the visible teaser/ subscribe prompt. Before parsing, walk the live document (getComputedStyle needs an attached node) and force display/visibility back on for anything hidden via display:none or visibility:hidden, then clone and hand that off to Readability as before. Verified live against a real West Hawaii Today article: extractedContent went from 588 characters (the RSS teaser) to 3458 (the full body).
Diffstat (limited to 'gradle')
0 files changed, 0 insertions, 0 deletions