merge #4812: [erome] add 'count' metadata field

This commit is contained in:
Mike Fährmann
2023-11-20 22:42:02 +01:00
2 changed files with 6 additions and 0 deletions

View File

@@ -44,11 +44,15 @@ class EromeExtractor(Extractor):
pos = page.index('<div class="user-profile', pos)
user, pos = text.extract(
page, 'href="https://www.erome.com/', '"', pos)
count, pos = text.extract(
page, 'fa-camera"></i>', '</span>', pos)
data = {
"album_id" : album_id,
"title" : text.unescape(title),
"user" : text.unquote(user),
"_http_headers": {"Referer": url},
"count" : text.parse_int(count),
}
yield Message.Directory, data

View File

@@ -16,6 +16,7 @@ __tests__ = (
"#count" : 1,
"album_id": "NQgdlWvk",
"count" : 1,
"num" : 1,
"title" : "porn",
"user" : "yYgWBZw8o8qsMzM",
@@ -29,6 +30,7 @@ __tests__ = (
"#count" : 6,
"album_id": "TdbZ4ogi",
"count" : 6,
"num" : int,
"title" : "82e78cfbb461ad87198f927fcb1fda9a1efac9ff.",
"user" : "yYgWBZw8o8qsMzM",