[hentaifoundry] fix metadata extraction
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2015-2020 Mike Fährmann
|
# Copyright 2015-2022 Mike Fährmann
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -84,12 +84,12 @@ class HentaifoundryExtractor(Extractor):
|
|||||||
.replace("\r\n", "\n"), "", "")),
|
.replace("\r\n", "\n"), "", "")),
|
||||||
"ratings" : [text.unescape(r) for r in text.extract_iter(extr(
|
"ratings" : [text.unescape(r) for r in text.extract_iter(extr(
|
||||||
"class='ratings_box'", "</div>"), "title='", "'")],
|
"class='ratings_box'", "</div>"), "title='", "'")],
|
||||||
"media" : text.unescape(extr("Media</b></td>\t\t<td>", "<")),
|
|
||||||
"date" : text.parse_datetime(extr("datetime='", "'")),
|
"date" : text.parse_datetime(extr("datetime='", "'")),
|
||||||
"views" : text.parse_int(extr("Views</b></td>\t\t<td>", "<")),
|
"views" : text.parse_int(extr(">Views</span>", "<")),
|
||||||
|
"score" : text.parse_int(extr(">Vote Score</span>", "<")),
|
||||||
|
"media" : text.unescape(extr(">Media</span>", "<").strip()),
|
||||||
"tags" : text.split_html(extr(
|
"tags" : text.split_html(extr(
|
||||||
"<td><b>Keywords</b></td>", "</tr>"))[::2],
|
">Tags </span>", "</div>")),
|
||||||
"score" : text.parse_int(extr('Score</b></td>\t\t<td>', '<')),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return text.nameext_from_url(data["src"], data)
|
return text.nameext_from_url(data["src"], data)
|
||||||
@@ -292,7 +292,7 @@ class HentaifoundryImageExtractor(HentaifoundryExtractor):
|
|||||||
"media" : "Other digital art",
|
"media" : "Other digital art",
|
||||||
"ratings": ["Sexual content", "Contains female nudity"],
|
"ratings": ["Sexual content", "Contains female nudity"],
|
||||||
"score" : int,
|
"score" : int,
|
||||||
"tags" : ["kancolle", "kantai", "collection", "shimakaze"],
|
"tags" : ["collection", "kancolle", "kantai", "shimakaze"],
|
||||||
"title" : "shimakaze",
|
"title" : "shimakaze",
|
||||||
"user" : "Tenpura",
|
"user" : "Tenpura",
|
||||||
"views" : int,
|
"views" : int,
|
||||||
|
|||||||
Reference in New Issue
Block a user