refactor: split modules and harden scraping workflows

This commit is contained in:
ShukeBta
2026-06-24 11:59:18 +08:00
parent efca3cbe69
commit 192f35d9fa
470 changed files with 47957 additions and 33839 deletions
+15
View File
@@ -9,6 +9,21 @@ func TestBuildSubscribeKeyword(t *testing.T) {
if got := buildSubscribeKeyword("沙丘", 0); got != "沙丘" {
t.Fatalf("keyword without year = %q", got)
}
if got := buildSubscribeKeyword("", 2024); got != "" {
t.Fatalf("empty keyword = %q, want empty", got)
}
}
func TestBuildSubscribeAliasesIncludesOriginalTitleWithYear(t *testing.T) {
got := buildSubscribeAliases("玩具总动员 5", "Toy Story 5", 2026)
for _, want := range []string{"玩具总动员 5", "Toy Story 5", "玩具总动员 5 2026", "Toy Story 5 2026"} {
if !containsString(got, want) {
t.Fatalf("aliases = %#v, missing %q", got, want)
}
}
if containsString(got, "2026") {
t.Fatalf("aliases = %#v, must not include bare year", got)
}
}
func TestDedupeExternalMedia(t *testing.T) {