mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[wikimedia] support wiki.gg wikis
This commit is contained in:
parent
40c1a8e471
commit
b57051719f
@ -1499,6 +1499,12 @@ Consider all listed sites to potentially be NSFW.
|
|||||||
<td>Articles</td>
|
<td>Articles</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>wiki.gg</td>
|
||||||
|
<td>https://www.wiki.gg/</td>
|
||||||
|
<td>Articles</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Super Mario Wiki</td>
|
<td>Super Mario Wiki</td>
|
||||||
<td>https://www.mariowiki.com/</td>
|
<td>https://www.mariowiki.com/</td>
|
||||||
|
@ -27,9 +27,9 @@ class WikimediaExtractor(BaseExtractor):
|
|||||||
|
|
||||||
if self.category == "wikimedia":
|
if self.category == "wikimedia":
|
||||||
self.category = self.root.split(".")[-2]
|
self.category = self.root.split(".")[-2]
|
||||||
elif self.category == "fandom":
|
elif self.category in ("fandom", "wikigg"):
|
||||||
self.category = \
|
self.category = "{}-{}".format(
|
||||||
"fandom-" + self.root.partition(".")[0].rpartition("/")[2]
|
self.category, self.root.partition(".")[0].rpartition("/")[2])
|
||||||
|
|
||||||
if path.startswith("wiki/"):
|
if path.startswith("wiki/"):
|
||||||
path = path[5:]
|
path = path[5:]
|
||||||
@ -152,6 +152,10 @@ BASE_PATTERN = WikimediaExtractor.update({
|
|||||||
"root": None,
|
"root": None,
|
||||||
"pattern": r"[\w-]+\.fandom\.com",
|
"pattern": r"[\w-]+\.fandom\.com",
|
||||||
},
|
},
|
||||||
|
"wikigg": {
|
||||||
|
"root": None,
|
||||||
|
"pattern": r"\w+\.wiki\.gg",
|
||||||
|
},
|
||||||
"mariowiki": {
|
"mariowiki": {
|
||||||
"root": "https://www.mariowiki.com",
|
"root": "https://www.mariowiki.com",
|
||||||
"pattern": r"(?:www\.)?mariowiki\.com",
|
"pattern": r"(?:www\.)?mariowiki\.com",
|
||||||
|
@ -143,6 +143,7 @@ CATEGORY_MAP = {
|
|||||||
"webmshare" : "webmshare",
|
"webmshare" : "webmshare",
|
||||||
"webtoons" : "Webtoon",
|
"webtoons" : "Webtoon",
|
||||||
"wikiart" : "WikiArt.org",
|
"wikiart" : "WikiArt.org",
|
||||||
|
"wikigg" : "wiki.gg",
|
||||||
"wikimediacommons": "Wikimedia Commons",
|
"wikimediacommons": "Wikimedia Commons",
|
||||||
"xbunkr" : "xBunkr",
|
"xbunkr" : "xBunkr",
|
||||||
"xhamster" : "xHamster",
|
"xhamster" : "xHamster",
|
||||||
|
24
test/results/wikigg.py
Normal file
24
test/results/wikigg.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
|
from gallery_dl.extractor import wikimedia
|
||||||
|
|
||||||
|
|
||||||
|
__tests__ = (
|
||||||
|
{
|
||||||
|
"#url" : "https://www.wiki.gg/wiki/Title",
|
||||||
|
"#comment" : "for scripts/supportedsites.py",
|
||||||
|
"#category": ("wikimedia", "wikigg-www", "article"),
|
||||||
|
"#class" : wikimedia.WikimediaArticleExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://hearthstone.wiki.gg/wiki/Flame_Juggler",
|
||||||
|
"#category": ("wikimedia", "wikigg-hearthstone", "article"),
|
||||||
|
"#class" : wikimedia.WikimediaArticleExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user