[wikimedia] support 'pidgi.net' and 'bulbapedia.bulbagarden.net' (#5205, #5206)

This commit is contained in:
Mike Fährmann
2024-02-17 17:27:22 +01:00
parent 7033cc14e9
commit ccb413df71
5 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# -*- 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://bulbapedia.bulbagarden.net/wiki/Jet",
"#category": ("wikimedia", "bulbapedia", "article"),
"#class" : wikimedia.WikimediaArticleExtractor,
"#pattern" : r"http://archives\.bulbagarden\.net/media/upload/\w+/\w+/[^/?#]+",
"#count" : range(10, 30),
},
{
"#url" : "https://archives.bulbagarden.net/wiki/File:0460Abomasnow-Mega.png",
"#category": ("wikimedia", "bulbapedia", "file"),
"#class" : wikimedia.WikimediaArticleExtractor,
"#pattern" : r"http://archives\.bulbagarden\.net/media/upload/\w+/\w+/[^/?#]+",
"#count" : range(8, 12),
"#archive" : False,
},
)

24
test/results/pidgiwiki.py Normal file
View 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.pidgi.net/wiki/File:Key_art_-_Fight_Knight.png",
"#category": ("wikimedia", "pidgiwiki", "file"),
"#class" : wikimedia.WikimediaArticleExtractor,
"#urls" : "https://cdn.pidgi.net/images/0/0c/Key_art_-_Fight_Knight.png",
},
{
"#url" : "https://pidgi.net/wiki/File:Key_art_-_Fight_Knight.png",
"#category": ("wikimedia", "pidgiwiki", "file"),
"#class" : wikimedia.WikimediaArticleExtractor,
},
)