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:
parent
c6ad9bcd9b
commit
a43cf78bb7
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user