[batoto] improve chapter info regex 2

- make regex case-insensitive
- match 'Season 12' and 'S12' as volume numbers
- match 'Episode 12' as chapter number
pull/4768/head
Mike Fährmann 1 month ago
parent 5208c0d28a
commit 802d74bdf6
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

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

Loading…
Cancel
Save