mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[wikimedia] fix non-English Fandom/wiki.gg articles (#6370)
This commit is contained in:
parent
7877f8cf1a
commit
8f0b0b0735
@ -193,7 +193,10 @@ class WikimediaArticleExtractor(WikimediaExtractor):
|
|||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
WikimediaExtractor.__init__(self, match)
|
WikimediaExtractor.__init__(self, match)
|
||||||
|
|
||||||
path = match.group(match.lastindex)
|
path = self.groups[-1]
|
||||||
|
if path[2] == "/":
|
||||||
|
self.root = self.root + "/" + path[:2]
|
||||||
|
path = path[3:]
|
||||||
if path.startswith("wiki/"):
|
if path.startswith("wiki/"):
|
||||||
path = path[5:]
|
path = path[5:]
|
||||||
|
|
||||||
|
@ -92,6 +92,14 @@ __tests__ = (
|
|||||||
"metadata" : {},
|
"metadata" : {},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://discogs.fandom.com/zh/wiki/File:CH-0430D2.jpg",
|
||||||
|
"#comment" : "non-English language prefix (#6370)",
|
||||||
|
"#category": ("wikimedia", "fandom-discogs", "file"),
|
||||||
|
"#class" : wikimedia.WikimediaArticleExtractor,
|
||||||
|
"#urls" : "https://static.wikia.nocookie.net/discogs/images/a/ab/CH-0430D2.jpg/revision/latest?cb=20241007150151&path-prefix=zh",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://projectsekai.fandom.com/wiki/Project_SEKAI_Wiki",
|
"#url" : "https://projectsekai.fandom.com/wiki/Project_SEKAI_Wiki",
|
||||||
"#category": ("wikimedia", "fandom-projectsekai", "article"),
|
"#category": ("wikimedia", "fandom-projectsekai", "article"),
|
||||||
|
@ -21,4 +21,13 @@ __tests__ = (
|
|||||||
"#class" : wikimedia.WikimediaArticleExtractor,
|
"#class" : wikimedia.WikimediaArticleExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://terraria.wiki.gg/de/wiki/Golem",
|
||||||
|
"#comment" : "non-English language prefix (#6370)",
|
||||||
|
"#category": ("wikimedia", "wikigg-terraria", "article"),
|
||||||
|
"#class" : wikimedia.WikimediaArticleExtractor,
|
||||||
|
"#count" : "> 45",
|
||||||
|
"#archive" : False,
|
||||||
|
},
|
||||||
|
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user