diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-11-13 19:56:19 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-11-13 19:56:19 +0000 |
| commit | 7374edc0773988ac3de4d0480a1005d5d1c8cd6d (patch) | |
| tree | 9080e5bc1fcc9d2a443c2cdb77c035df13065ec3 /app/src/test/resources/west-hawaii-today-usps-extracted.html | |
| parent | 17643797517693664e6d4f5e5911b9855d6c484b (diff) | |
"Remove giant Google icon", reported on a West Hawaii Today article. It is the
"Add as a preferred source on Google" badge that sits beside the byline. Giant
because the page caps it at 120px with its own stylesheet and the reader drops
the page's CSS, so a small badge on the site becomes a full-width image above
the first paragraph.
Matched on the link's address rather than the class, and that is forced rather
than preferred: running the vendored Readability.js over the real page shows
the wrapper's preferred_source_badge class does not survive extraction at all,
so a class rule would match nothing. The anchor does survive, and its address
is Google's own and identical for every publisher in the programme -- where the
badge's image filename sits under this newspaper's theme directory and is not.
So the address is both the only signal left and the one that generalises.
A link with words in it is never touched. An article may discuss the programme
and link to it in a sentence, and that sentence is the author's.
Both cleaners now run from one entry point. There are two places a body is
cleaned -- a fresh extraction on the way out, a cached one on the way back in --
and a cached article is cleaned in place rather than discarded, so a cleaner
wired into only the fresh path would leave every already-read article carrying
litter nothing would ever remove. Peter's report says the article was cached,
which is exactly that case.
Pinned against the real thing: the reported article, put through the real
extractor, loses the badge and keeps its text and byline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'app/src/test/resources/west-hawaii-today-usps-extracted.html')
| -rw-r--r-- | app/src/test/resources/west-hawaii-today-usps-extracted.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/src/test/resources/west-hawaii-today-usps-extracted.html b/app/src/test/resources/west-hawaii-today-usps-extracted.html new file mode 100644 index 0000000..d52ec07 --- /dev/null +++ b/app/src/test/resources/west-hawaii-today-usps-extracted.html @@ -0,0 +1,18 @@ +<div id="readability-page-1" class="page"><div id="article_info"> + <div> + <p>Published 12:05 am Friday, November 13, 2026</p> + <p> + <strong>By Cailley LaPara Bloomberg News</strong> + </p> + </div> + <p><a href="https://www.google.com/preferences/source?q=westhawaiitoday.com" target="_blank" rel="noopener"> + <img src="https://www.westhawaiitoday.com/wp-content/themes/2024-cmg/media/img/google_preferred_source_badge_light_en.png" alt="Add as a preferred source on Google"> + </a> + </p> + </div><div id="article_content"><p>The U.S. Postal Service is moving to raise and make permanent its fuel surcharge, which the agency introduced for the first time earlier this year.</p> +<p>The fuel surcharge will increase to 11% from 8% starting in January, the USPS said in a statement Thursday. Certain domestic shipping services also will increase by an average of 5.9%. That adjustment is in line with the typical annual rate changes that other large parcel carriers have announced for the year ahead.</p> +<p>The fuel surcharge hike comes after diesel prices hit record highs due to the war in Iran. The USPS implemented its first-ever fuel related fee in April, soon after the war started and diesel prices jumped. Costs have continued to increase throughout the year.</p> +<p>Shares of parcel giants United Parcel Service Inc. fell 1% and FedEx Corp. slipped less than 1% on Thursday after the Postal Service announced the planned price hikes. Both companies are contending with similar cost headwinds and are leaning heavily on pricing to boost revenue.</p> +<p>The announcement comes days after the USPS reported annual financial results which showed that the agency lost $6.5 billion in fiscal year 2026, compared with $9 billion the year prior.</p> +<p>The USPS faces a dire financial situation due to its massive operational costs and waning mail volume. Postmaster General David Steiner has said the agency could run out of money as soon as February, and has halted discretionary spending and certain retirement contributions to stave off a liquidity crisis. He has also asked Congress for help solving some of the agency’s structural financial issues.</p> +</div></div>
\ No newline at end of file |
