diff --git a/backend/internal/latest/sites.go b/backend/internal/latest/sites.go index 7b2f2f5..0c354ec 100644 --- a/backend/internal/latest/sites.go +++ b/backend/internal/latest/sites.go @@ -98,11 +98,7 @@ const lnwCommentMarker = "wpd-threads" // such guarantee — demonicChapterRe matches any chaptered.php?manga= anchor // with no per-series scoping, because the stored series_id for demonic is a // slug, not the numeric id the URL carries, so it cannot easily be scoped. -// lightnovelworld is unscoped for a stronger reason: its chapter addresses -// carry the Chapter Slug, which is not the Series identity, so no stored-slug -// pattern can cover a Series' whole list (see lnwChapterRe). Instead of -// scoping, its branch scans only the body before the comment thread marker and -// skips the page when the marker is absent. +// lightnovelworld is unscoped and body-truncated instead — see lnwChapterRe. func latestChapterFrom(site, seriesURL, body string) (latestChapter, bool) { var re *regexp.Regexp switch site { @@ -151,11 +147,11 @@ func latestChapterFrom(site, seriesURL, body string) (latestChapter, bool) { // page any visitor can write to, so the scan never reads past it (see // lnwChapterRe). A body without the marker is skipped, never scanned // whole — a redesign must degrade into staleness, not into a wrong - // shared value. The body length distinguishes a genuine markup change - // from a body the size cap cut short. + // shared value; the logged body length tells a markup change from a + // body the size cap cut short. i := strings.Index(body, lnwCommentMarker) if i < 0 { - log.Printf("latest poll %q: no %s marker in %d bytes; skipping", seriesURL, lnwCommentMarker, len(body)) + log.Printf("latest poll %q: no %s marker in %d bytes", seriesURL, lnwCommentMarker, len(body)) return latestChapter{}, false } body = body[:i] diff --git a/backend/internal/latest/sites_test.go b/backend/internal/latest/sites_test.go index 6afd0af..d665b25 100644 --- a/backend/internal/latest/sites_test.go +++ b/backend/internal/latest/sites_test.go @@ -414,8 +414,8 @@ func TestLatestChapterFrom(t *testing.T) { // Stored before the slug split, so the address carries the ...-not // Chapter Slug; the 100-423 block under the other slug must still win. // The body is the chapter-list portion of lnwSeriesFixture with the - // comment block omitted (that is the next case's job); the marker is - // kept, because a body without it is skipped, not scanned. + // comment block omitted; the marker is kept, because a body without it + // is skipped, not scanned. { name: "lightnovelworld max spans both chapter slugs", site: "lightnovelworld",