bugfix: chapter source key uses chapter id, not /pg-1/ (0.23.1)
Listing links point at the reader's page 1 (`.../uu/br_chapter-N/pg-1/`). The generic `derive_key_from_url` took the last URL segment and returned `"pg-1"` for every chapter, so all parsed chapters collapsed onto a single `chapter_sources` row downstream and the first-manga chapter was the only row that survived. New `derive_chapter_key_from_url` strips a trailing `/pg-\d+/` before picking the chapter-identifying segment (`br_chapter-N` / `to_chapter-N`). Notices, hiatus rows, and duplicate-numbered chapters are preserved as distinct parser entries. The (manga_id, number) UNIQUE collapse in the chapters table is a separate, follow-up concern handled in feat/chapter-id-routing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
194
backend/tests/fixtures/target/chapter_list_uu.html
vendored
Normal file
194
backend/tests/fixtures/target/chapter_list_uu.html
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
<table class="listing" id="chapter_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-379272/pg-1/"><b>Ch.67</b>
|
||||
: Official </a>
|
||||
<b style="color:#FEFD7F;width;30px;display:inline-block;margin-left:5px">new</b>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">May 20, 2026</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-328248/pg-1/"><b>hitaus.</b>
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">Jan 15, 2026</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-326351/pg-1/"><b>Ch.66</b>
|
||||
: Official </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">Jan 10, 2026</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-295078/pg-1/"><b>Ch.52</b>
|
||||
: Official </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">Aug 28, 2025</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-294815/pg-1/"><b>Ch.52</b>
|
||||
: Official </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../4300634/upload/">mina</a>
|
||||
</td>
|
||||
<td class="no">Aug 27, 2025</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-249964/pg-1/"><b>Ch.10</b>
|
||||
: Official </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">Jan 5, 2025</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/to_chapter-13/pg-1/"><b>Ch.13</b>
|
||||
: Thank you, we'll see you in the next one! </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no"></td>
|
||||
<td class="no">Dec 30, 2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-249095/pg-1/"><b>Ch.9</b>
|
||||
: Official </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">Dec 28, 2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-248930/pg-1/"><b>Ch.1</b>
|
||||
: Official </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">Dec 26, 2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/to_chapter-12/pg-1/"><b>Ch.12</b>
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no"></td>
|
||||
<td class="no">Dec 1, 2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-244844/pg-1/"><b>notice.</b>
|
||||
: Officials </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">Nov 26, 2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/to_chapter-11/pg-1/"><b>Ch.11</b>
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no"></td>
|
||||
<td class="no">Nov 18, 2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-221180/pg-1/"><b>notice.</b>
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../3781074/upload/">Izanami</a>
|
||||
</td>
|
||||
<td class="no">Jun 21, 2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-234803/pg-1/"><b>notice.</b>
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../2843005/upload/">bloomingdale</a>
|
||||
</td>
|
||||
<td class="no">Sep 13, 2024</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<a class="chico"
|
||||
href=".../uu/br_chapter-220299/pg-1/"><b>Ch.1</b>
|
||||
: Team Hazama </a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="no">
|
||||
<a href=".../1457681/upload/">purplepandabear</a>
|
||||
</td>
|
||||
<td class="no">Jun 16, 2024</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user