Files
shelfmark/tests/audiobookbay
splitsec2andMichael Ngo 5bc64df95d fix(audiobookbay): decode base64-encoded post markup (#1656)
AudiobookBay now serves its search results base64-encoded inside hidden
.post divs and decodes them in the browser. The scraper looked for
.postTitle directly, so every search came back with zero results and no
error.

_decode_post base64-decodes each .post payload and reparses it, and
hands the element back unchanged when it is not base64 or has no
postTitle, so a mirror still serving plain markup keeps working. A page
that has .post elements but parses none of them now logs a warning, so
the next markup change shows up instead of looking like an empty result.

Ported from DrNgo/shelfmark-fork@7fb5f27 by @DrNgo, with the commit
co-authored to him. The tests cover both markups and the warning. I have
not run this build against the live site yet, which is why it is a
draft: from the box I tried, a search gets redirected to the homepage
with or without the fix, so that proved nothing. I will mark it ready
once it has run on my instance.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* AudiobookBay search can now display results when listing details are
wrapped in encoded markup. These results include the same available
information as listings in plain markup, such as title, format, file
size, date, and cover image. This improves consistency when searching
across different AudiobookBay page formats.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Michael Ngo <michaeln56@gmail.com>
2026-11-13 16:53:37 -06:00
..
2026-06-23 16:58:24 -04:00