aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/hentaicafe.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/hentaicafe.py')
-rw-r--r--gallery_dl/extractor/hentaicafe.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/gallery_dl/extractor/hentaicafe.py b/gallery_dl/extractor/hentaicafe.py
index 1ab71d6..833135e 100644
--- a/gallery_dl/extractor/hentaicafe.py
+++ b/gallery_dl/extractor/hentaicafe.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2018-2019 Mike Fährmann
+# Copyright 2018-2020 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -50,17 +50,17 @@ class HentaicafeMangaExtractor(foolslide.FoolslideMangaExtractor):
# single chapter
("https://hentai.cafe/hazuki-yuuto-summer-blues/", {
"url": "f8e24a07d6fbb7c6a6ec5ad8ad8faf2436f8751b",
- "keyword": "eb9f98544098c961bd8cf5dbe69e6da51c4fb2f6",
+ "keyword": "5af1c570bb5f533a32b3375f9cdaa17a0152ba67",
}),
# multi-chapter
("https://hentai.cafe/saitom-saitom-box/", {
"url": "ca3e8a91531fd6acd863d93ac3afbd8ead06a076",
- "keyword": "28271062d7b4a2f99a0e1a894f69af8c5581a6bb",
+ "keyword": "3c28517d356cac6acbd9895c9eeefae505304078",
}),
# new-style URL
("https://hentai.cafe/hc.fyi/2782", {
"url": "ca3e8a91531fd6acd863d93ac3afbd8ead06a076",
- "keyword": "28271062d7b4a2f99a0e1a894f69af8c5581a6bb",
+ "keyword": "3c28517d356cac6acbd9895c9eeefae505304078",
}),
# foolslide URL
("https://hentai.cafe/manga/series/saitom-box/", {
@@ -80,12 +80,14 @@ class HentaicafeMangaExtractor(foolslide.FoolslideMangaExtractor):
chapters.reverse()
return chapters
- tags , pos = text.extract(page, "<p>Tags: ", "</br>")
+ url , pos = text.extract(page, '<link rel="canonical" href="', '"')
+ tags , pos = text.extract(page, "<p>Tags: ", "</br>", pos)
artist, pos = text.extract(page, "\nArtists: ", "</br>", pos)
manga , pos = text.extract(page, "/manga/read/", "/", pos)
data = {
- "tags" : text.split_html(tags)[::2],
- "artist": text.split_html(artist),
+ "manga_id": text.parse_int(url.rpartition("/")[2]),
+ "tags" : text.split_html(tags)[::2],
+ "artist" : text.split_html(artist),
}
HentaicafeChapterExtractor._data(manga).update(data)