1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[batoto] extract 'chapter_url' (#5562)

i.e. the chapter number found in the full chapter URL
This commit is contained in:
Mike Fährmann 2024-08-13 20:57:33 +02:00
parent 3b0753f6ea
commit f0de1685ae
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 23 additions and 0 deletions

View File

@ -65,6 +65,8 @@ class BatotoChapterExtractor(BatotoBase, ChapterExtractor):
return {
"manga" : text.unescape(manga),
"manga_id" : text.parse_int(manga_id),
"chapter_url" : text.parse_int(extr(
self.chapter_id + "-ch_", '"')),
"title" : text.unescape(text.remove_html(extr(
"selected>", "</option")).partition(" : ")[2]),
"volume" : text.parse_int(volume),

View File

@ -17,6 +17,7 @@ __tests__ = (
"chapter" : 8,
"chapter_id" : 1681030,
"chapter_minor": "",
"chapter_url" : 8,
"count" : 66,
"date" : "dt:2021-05-15 18:51:37",
"extension" : "webp",
@ -51,6 +52,7 @@ __tests__ = (
"chapter" : 9,
"chapter_id": 2584460,
"chapter_minor": "",
"chapter_url": 9,
"count" : 18,
"date" : "dt:2023-11-26 11:01:12",
"manga" : "Isekai Teni shitara Aiken ga Saikyou ni narimashita - Silver Fenrir to Ore ga Isekai Kurashi wo Hajimetara (Official)",
@ -68,9 +70,28 @@ __tests__ = (
"chapter" : 76,
"chapter_id" : 2089747,
"chapter_minor": "",
"chapter_url" : 76,
"title" : "Side Story 4 [END]",
},
{
"#url" : "https://bato.to/title/115494-today-with-you/2631897-ch_38",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
"chapter" : 37,
"chapter_id" : 2631897,
"chapter_minor" : "",
"chapter_string": "S1 Episode 37 (End of season)",
"chapter_url" : 38,
"count" : 69,
"date" : "dt:2023-12-20 17:31:18",
"manga" : "Today With You",
"manga_id" : 115494,
"title" : "",
"volume" : 1,
},
{
"#url" : "https://bato.to/title/86408/1681030",
"#category": ("", "batoto", "chapter"),