[batoto] improve chapter info regex 2

- make regex case-insensitive
- match 'Season 12' and 'S12' as volume numbers
- match 'Episode 12' as chapter number
This commit is contained in:
Mike Fährmann
2024-08-13 20:16:44 +02:00
parent 5208c0d28a
commit 802d74bdf6

View File

@@ -54,8 +54,8 @@ class BatotoChapterExtractor(BatotoBase, ChapterExtractor):
info = text.unescape(info)
match = re.match(
r"(?:Volume\s+(\d+) )?"
r"[Cc]hapter\s*(\d+)([\w.]*)", info)
r"(?i)(?:(?:Volume|S(?:eason)?)\s*(\d+)\s+)?"
r"(?:Chapter|Episode)\s*(\d+)([\w.]*)", info)
if match:
volume, chapter, minor = match.groups()
title = text.unescape(text.remove_html(extr(