fix for "test_unique_pattern_matches"
This commit is contained in:
@@ -65,18 +65,21 @@ class _2chenBoardExtractor(Extractor):
|
|||||||
"""Extractor for 2chen boards"""
|
"""Extractor for 2chen boards"""
|
||||||
category = "2chen"
|
category = "2chen"
|
||||||
subcategory = "board"
|
subcategory = "board"
|
||||||
pattern = r"(?:https?://)?2chen\.moe/([^/?#]+)(?:catalog)?"
|
pattern = r"(?:https?://)?2chen\.moe/([^/?#]+)/?(?:catalog)?$"
|
||||||
test = (
|
test = (
|
||||||
("https://2chen.moe/co/", {
|
("https://2chen.moe/co/", {
|
||||||
"pattern": _2chenThreadExtractor.pattern
|
"pattern": _2chenThreadExtractor.pattern
|
||||||
}),
|
}),
|
||||||
|
("https://2chen.moe/co", {
|
||||||
|
"pattern": _2chenThreadExtractor.pattern
|
||||||
|
}),
|
||||||
("https://2chen.moe/co/catalog", {
|
("https://2chen.moe/co/catalog", {
|
||||||
"pattern": _2chenThreadExtractor.pattern
|
"pattern": _2chenThreadExtractor.pattern
|
||||||
}))
|
}))
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
Extractor.__init__(self, match)
|
Extractor.__init__(self, match)
|
||||||
self.board = match.group(1)
|
self.board = match.group()
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
url = "https://2chen.moe/{}/catalog".format(self.board)
|
url = "https://2chen.moe/{}/catalog".format(self.board)
|
||||||
|
|||||||
Reference in New Issue
Block a user