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

[erome] tests

This commit is contained in:
Mike Fährmann 2023-11-20 22:41:12 +01:00
parent c6ad9bcd9b
commit a43cf78bb7
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 6 additions and 2 deletions

View File

@ -44,13 +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 = text.extr(page, 'fa-camera"></i>', '</span>')
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" : count,
"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",