[reddit] fix 'extractor.blacklist()' arguments

The second argument must support 'append()'.
This commit is contained in:
Mike Fährmann
2019-09-24 23:01:12 +02:00
parent 22bac14452
commit 913460240d
4 changed files with 5 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ class HypnohubTagExtractor(booru.TagMixin, HypnohubExtractor):
pattern = (r"(?:https?://)?(?:www\.)?hypnohub\.net" pattern = (r"(?:https?://)?(?:www\.)?hypnohub\.net"
r"/post\?(?:[^&#]*&)*tags=(?P<tags>[^&#]+)") r"/post\?(?:[^&#]*&)*tags=(?P<tags>[^&#]+)")
test = ("https://hypnohub.net/post?tags=gonoike_biwa", { test = ("https://hypnohub.net/post?tags=gonoike_biwa", {
"url": "6bebc4318489ee37e0c3b814352acd6783ba95d6", "url": "0deaf1a2f832cfc4354c531259b949e850da1e7e",
}) })

View File

@@ -244,7 +244,7 @@ class ImgurUserExtractor(ImgurExtractor):
("https://imgur.com/user/Miguenzo", { ("https://imgur.com/user/Miguenzo", {
"range": "1-100", "range": "1-100",
"count": 100, "count": 100,
"pattern": r"https?://(i.imgur.com|imgur.com/a)/[\w.]+" "pattern": r"https?://(i.imgur.com|imgur.com/a)/[\w.]+",
}), }),
("https://imgur.com/user/Miguenzo/posts"), ("https://imgur.com/user/Miguenzo/posts"),
("https://imgur.com/user/Miguenzo/submitted"), ("https://imgur.com/user/Miguenzo/submitted"),
@@ -263,7 +263,7 @@ class ImgurFavoriteExtractor(ImgurExtractor):
test = ("https://imgur.com/user/Miguenzo/favorites", { test = ("https://imgur.com/user/Miguenzo/favorites", {
"range": "1-100", "range": "1-100",
"count": 100, "count": 100,
"pattern": r"https?://(i.imgur.com|imgur.com/a)/[\w.]+" "pattern": r"https?://(i.imgur.com|imgur.com/a)/[\w.]+",
}) })
def items(self): def items(self):

View File

@@ -32,7 +32,7 @@ class RedditExtractor(Extractor):
yield Message.Version, 1 yield Message.Version, 1
with extractor.blacklist( with extractor.blacklist(
util.SPECIAL_EXTRACTORS, util.SPECIAL_EXTRACTORS,
(RedditSubredditExtractor, RedditUserExtractor)): [RedditSubredditExtractor, RedditUserExtractor]):
while True: while True:
extra = [] extra = []
for url, data in self._urls(submissions): for url, data in self._urls(submissions):

View File

@@ -27,8 +27,8 @@ TRAVIS_SKIP = {
# temporary issues, etc. # temporary issues, etc.
BROKEN = { BROKEN = {
"8chan", "8chan",
"imgth",
"mangapark", "mangapark",
"nsfwalbum",
} }