diff --git a/gallery_dl/extractor/hentai2read.py b/gallery_dl/extractor/hentai2read.py
index 4e2d42ad..eeba2f31 100644
--- a/gallery_dl/extractor/hentai2read.py
+++ b/gallery_dl/extractor/hentai2read.py
@@ -23,17 +23,37 @@ class Hentai2readMangaExtractor(MangaExtractor):
test = [
("http://hentai2read.com/amazon_elixir/", {
"url": "273073752d418ec887d7f7211e42b832e8c403ba",
+ "keyword": "13c1ce7e15cbb941f01c843b0e89adc993d939ac",
}),
("http://hentai2read.com/oshikage_riot/", {
"url": "6595f920a3088a15c2819c502862d45f8eb6bea6",
+ "keyword": "675c7b7a4fa52cf569c283553bd16b4200a5cd36",
}),
]
def chapters(self, page):
- page = text.extract(
- page, '
\n'
- )[0]
- return list(text.extract_iter(page, '\n', '')
+ mtype, pos = text.extract(
+ page, '[', ']', pos)
+ manga_id = int(text.extract(page, 'data-mid="', '"', pos)[0])
+ page, pos = text.extract(
+ page, '\n')
+
+ pos = 0
+ while True:
+ url, pos = text.extract(page, '\n", "")[0]
+ chapter_id = text.extract(page, 'data-cid="', '"')[0]
match = re.match(r"Reading (.+) \(([^)]+)\) Hentai(?: by (.+))? - "
r"(\d+): (.+) . Page 1 ", title)
return {
"manga_id": images[0].split("/")[-3],
- "chapter": self.chapter,
- "count": len(images),
"manga": match.group(1),
"type": match.group(2),
+ "chapter_id": chapter_id,
+ "chapter": self.chapter,
"author": match.group(3),
"title": match.group(5),
+ "count": len(images),
"lang": "en",
"language": "English",
}