diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-22 20:11:09 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-22 20:11:09 +0000 |
| commit | ee019c91f66b6ba35b7295ea01220c6c13819b1c (patch) | |
| tree | 19c4fa73acb6e9a5e8cc6cac71526cb2b22c3aca /app/src/main/java/org/terst/feedreader/data/Net.kt | |
| parent | 7b0be4757356af46df1eb55d596f819c21b00f3e (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 'app/src/main/java/org/terst/feedreader/data/Net.kt')
0 files changed, 0 insertions, 0 deletions
