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