replace space characters in unit test URLs
This commit is contained in:
@@ -26,7 +26,7 @@ class ThreedeebooruTagExtractor(ThreedeebooruExtractor,
|
||||
"""Extractor for images from behoimi.org based on search-tags"""
|
||||
pattern = [r"(?:https?://)?(?:www\.)?behoimi\.org/post"
|
||||
r"(?:/(?:index)?)?\?tags=([^&]+)"]
|
||||
test = [("http://behoimi.org/post?tags=himekawa_azuru dress", {
|
||||
test = [("http://behoimi.org/post?tags=himekawa_azuru+dress", {
|
||||
"url": "ecb30c6aaaf8a6ff8f55255737a9840832a483c1",
|
||||
"content": "11cbda40c287e026c1ce4ca430810f761f2d0b2a",
|
||||
})]
|
||||
|
||||
@@ -141,7 +141,7 @@ class ImagefapUserExtractor(Extractor):
|
||||
r"profile(?:\.php\?user=|/)([^/]+)"),
|
||||
(r"(?:https?://)?(?:www\.)?imagefap\.com/"
|
||||
r"usergallery\.php\?userid=(\d+)")]
|
||||
test = [("http://www.imagefap.com/profile/Mr Bad Example/galleries", {
|
||||
test = [("http://www.imagefap.com/profile/Mr%20Bad%20Example/galleries", {
|
||||
"url": "145e98a8648c7695c150800ff8fd578ab26c28c1",
|
||||
})]
|
||||
|
||||
@@ -158,7 +158,7 @@ class ImagefapUserExtractor(Extractor):
|
||||
yield Message.Version, 1
|
||||
for gid, name in self.get_gallery_data():
|
||||
url = "http://www.imagefap.com/gallery/" + gid
|
||||
data = {"gallery_id": util.safe_int(gid), "name": name}
|
||||
data = {"gallery_id": util.safe_int(gid), "title": name}
|
||||
yield Message.Queue, url, data
|
||||
|
||||
def get_gallery_data(self):
|
||||
|
||||
@@ -116,7 +116,7 @@ class TumblrTagExtractor(TumblrUserExtractor):
|
||||
"""Extractor for images from a tumblr-user by tag"""
|
||||
subcategory = "tag"
|
||||
pattern = [r"(?:https?://)?([^.]+)\.tumblr\.com/tagged/(.+)"]
|
||||
test = [("http://demo.tumblr.com/tagged/Times Square", {
|
||||
test = [("http://demo.tumblr.com/tagged/Times%20Square", {
|
||||
"keyword": "b0465d131ecb097633127b79805432dacae06d14",
|
||||
"pattern": "https://\d+\.media\.tumblr\.com/tumblr_[^/_]+_1280.jpg",
|
||||
"count": 1,
|
||||
@@ -124,4 +124,4 @@ class TumblrTagExtractor(TumblrUserExtractor):
|
||||
|
||||
def __init__(self, match):
|
||||
TumblrUserExtractor.__init__(self, match)
|
||||
self.api_params["tagged"] = match.group(2)
|
||||
self.api_params["tagged"] = text.unquote(match.group(2))
|
||||
|
||||
@@ -20,7 +20,7 @@ class YandereExtractor(booru.JSONBooruExtractor):
|
||||
class YandereTagExtractor(YandereExtractor, booru.BooruTagExtractor):
|
||||
"""Extractor for images from yande.re based on search-tags"""
|
||||
pattern = [r"(?:https?://)?(?:www\.)?yande\.re/post\?tags=([^&]+)"]
|
||||
test = [("https://yande.re/post?tags=ouzoku armor", {
|
||||
test = [("https://yande.re/post?tags=ouzoku+armor", {
|
||||
"content": "59201811c728096b2d95ce6896fd0009235fe683",
|
||||
})]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user