From 0b3c4629600062cc13a445ee9fa9e818c97520bb Mon Sep 17 00:00:00 2001 From: Dima Pashutskii Date: Thu, 7 May 2026 16:54:06 +0200 Subject: [PATCH] Fix #57: drop dead _app- script filter, refresh hardcoded /api/bleed fallbacks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HLTB rotated the search endpoint again (/api/finder -> /api/bleed). Runtime discovery in `SearchInformations.__extract_search_url_script` already adapts to that, but two things were keeping searches from succeeding on a cold call: 1. `send_website_request_getcode` and its async sibling were filtering scripts by `'_app-' in script['src']` on the first pass. HLTB used to bundle the relevant code under `_app-*.js`, but the modern (Turbopack) build emits opaque chunk names like `0-~-0up.q3_p0.js`. The filter never matches today, so the first pass always returned None and forced every search through a redundant retry loop. 2. The hardcoded fallbacks (`SEARCH_URL`, `SearchAuthToken.search_url`) were pinned to `/api/s` — three rename cycles behind. Refreshed to `/api/bleed`. Changes: * `send_website_request_getcode` / `async_send_website_request_getcode` now iterate every `