Wikis hosted on fandom.com are just wikimedia instances and support its API.
This commit is contained in:
@@ -25,6 +25,10 @@ class WikimediaExtractor(BaseExtractor):
|
||||
BaseExtractor.__init__(self, match)
|
||||
path = match.group(match.lastindex)
|
||||
|
||||
if self.category == "fandom":
|
||||
self.category = \
|
||||
"fandom-" + self.root.partition(".")[0].rpartition("/")[2]
|
||||
|
||||
if path.startswith("wiki/"):
|
||||
path = path[5:]
|
||||
self.api_path = "/w/api.php"
|
||||
@@ -158,6 +162,11 @@ BASE_PATTERN = WikimediaExtractor.update({
|
||||
"root": "https://www.mediawiki.org",
|
||||
"pattern": r"(?:www\.)?mediawiki\.org",
|
||||
},
|
||||
"fandom": {
|
||||
"root": None,
|
||||
"pattern": r"[\w-]+\.fandom\.com",
|
||||
"api-path": "/api.php",
|
||||
},
|
||||
"mariowiki": {
|
||||
"root": "https://www.mariowiki.com",
|
||||
"pattern": r"(?:www\.)?mariowiki\.com",
|
||||
|
||||
Reference in New Issue
Block a user