Collapse watchlist alternative titles

This commit is contained in:
Dymas
2026-05-23 19:01:30 +02:00
parent 84c2e533d0
commit 0c1b46e395
7 changed files with 58 additions and 17 deletions
+10
View File
@@ -199,6 +199,16 @@ def parse_allmanga_alternative_titles(html_text, primary_title=""):
for match in re.findall(r'"([^"]+)"', body):
add_candidate(match, english_preferred=english_preferred)
for match in re.findall(
r'<span[^>]*class="[^"]*\baltnames\b[^"]*"[^>]*>\s*(.*?)\s*</span>',
text,
flags=re.IGNORECASE | re.DOTALL,
):
cleaned = re.sub(r"<[^>]+>", " ", match)
cleaned = cleaned.replace("&nbsp;", " ")
cleaned = re.sub(r"^[\s\u25cf\u26aa\u2022]+", "", cleaned)
add_candidate(cleaned, english_preferred=not preferred_english)
deduped = unique_title_values(candidates, primary)
english_title = ""
for candidate in unique_title_values([preferred_english], primary):