update extractor test results

pull/1352/head
Mike Fährmann 4 years ago
parent 1bd3d7cfb0
commit 3df527ee2c
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -50,7 +50,8 @@ class EromeExtractor(Extractor):
for data["num"], group in enumerate(util.advance(groups, 1), 1):
url = (text.extract(group, '<source src="', '"')[0] or
text.extract(group, 'data-src="', '"')[0])
yield Message.Url, url, text.nameext_from_url(url, data)
if url:
yield Message.Url, url, text.nameext_from_url(url, data)
def albums(self):
return ()
@ -84,14 +85,14 @@ class EromeAlbumExtractor(EromeExtractor):
"""Extractor for albums on erome.com"""
subcategory = "album"
pattern = BASE_PATTERN + r"/a/(\w+)"
test = ("https://www.erome.com/a/UHUX1B73", {
"pattern": r"https://s\d+\.erome\.com/342/UHUX1B73/\w+",
"count": 5,
test = ("https://www.erome.com/a/KandxY7y", {
"pattern": r"https://s\d+\.erome\.com/355/KandxY7y/\w+",
"count": 26,
"keyword": {
"album_id": "UHUX1B73",
"album_id": "KandxY7y",
"num": int,
"title": "Ryan Ryans",
"user": "gutiquq",
"title": "Therealbrittfitt",
"user": "pokow",
},
})

@ -72,7 +72,7 @@ class GelbooruV02TagExtractor(GelbooruV02Extractor):
pattern = BASE_PATTERN + r"/index\.php\?page=post&s=list&tags=([^&#]+)"
test = (
("https://rule34.xxx/index.php?page=post&s=list&tags=danraku", {
"content": "0a3aa1e302bd4ed0599305cd4c225ca8d28249b2",
"content": "97e4bbf86c3860be18de384d02d544251afe1d45",
"pattern": r"https?://.*rule34\.xxx/images/\d+/[0-9a-f]+\.jpg",
"count": 1,
}),
@ -155,7 +155,7 @@ class GelbooruV02PostExtractor(GelbooruV02Extractor):
pattern = BASE_PATTERN + r"/index\.php\?page=post&s=view&id=(\d+)"
test = (
("https://rule34.xxx/index.php?page=post&s=view&id=1995545", {
"content": "0a3aa1e302bd4ed0599305cd4c225ca8d28249b2",
"content": "97e4bbf86c3860be18de384d02d544251afe1d45",
"options": (("tags", True),),
"keyword": {
"tags_artist": "danraku",

@ -166,8 +166,6 @@ class ImgurAlbumExtractor(ImgurExtractor):
"privacy" : "private",
"score" : int,
"title" : "138",
"topic" : "",
"topic_id" : 0,
"upvote_count" : int,
"url" : "https://imgur.com/a/TcBmP",
"view_count" : int,

@ -232,11 +232,11 @@ class JoyreactorSearchExtractor(ReactorSearchExtractor):
category = "joyreactor"
pattern = JR_BASE_PATTERN + r"/search(?:/|\?q=)([^/?#]+)"
test = (
("http://joyreactor.cc/search/Cirno", {
("http://joyreactor.cc/search/Nature", {
"range": "1-25",
"count": ">= 20",
}),
("http://joyreactor.com/search?q=Cirno", {
("http://joyreactor.com/search?q=Nature", {
"range": "1-25",
"count": ">= 20",
}),
@ -306,10 +306,7 @@ class PornreactorSearchExtractor(ReactorSearchExtractor):
category = "pornreactor"
pattern = PR_BASE_PATTERN + r"/search(?:/|\?q=)([^/?#]+)"
test = (
("http://pornreactor.cc/search?q=ecchi+hentai", {
"range": "1-25",
"count": ">= 25",
}),
("http://pornreactor.cc/search?q=ecchi+hentai"),
("http://fapreactor.com/search/ecchi+hentai"),
)

@ -122,7 +122,7 @@ class UnsplashImageExtractor(UnsplashExtractor):
"total_photos": int,
"twitter_username": None,
"updated_at": str,
"username": "johnwestrock"
"username": "davehoefler",
},
"views": int,
"width": 4480,
@ -138,7 +138,7 @@ class UnsplashUserExtractor(UnsplashExtractor):
"""Extractor for all photos of an unsplash user"""
subcategory = "user"
pattern = BASE_PATTERN + r"/@(\w+)/?$"
test = ("https://unsplash.com/@johnwestrock", {
test = ("https://unsplash.com/@davehoefler", {
"pattern": r"https://images\.unsplash\.com/(photo-\d+-\w+"
r"|reserve/[^/?#]+)\?ixid=\w+&ixlib=rb-1\.2\.1$",
"range": "1-30",
@ -155,7 +155,7 @@ class UnsplashFavoriteExtractor(UnsplashExtractor):
"""Extractor for all likes of an unsplash user"""
subcategory = "favorite"
pattern = BASE_PATTERN + r"/@(\w+)/likes"
test = ("https://unsplash.com/@johnwestrock/likes", {
test = ("https://unsplash.com/@davehoefler/likes", {
"pattern": r"https://images\.unsplash\.com/(photo-\d+-\w+"
r"|reserve/[^/?#]+)\?ixid=\w+&ixlib=rb-1\.2\.1$",
"range": "1-30",

Loading…
Cancel
Save