[wikimedia] update

- rewrite using BaseExtractor
- support most Wiki* domains
- update docs/supportedsites
- add tests
This commit is contained in:
Mike Fährmann
2024-01-16 22:08:03 +01:00
parent 221f54309c
commit c3c1635ef3
12 changed files with 426 additions and 156 deletions

View File

@@ -0,0 +1,23 @@
# -*- 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.wiktionary.org/wiki/Word",
"#category": ("wikimedia", "wiktionary", "article"),
"#class" : wikimedia.WikimediaArticleExtractor,
},
{
"#url" : "https://en.wiktionary.org/wiki/Category:Words",
"#category": ("wikimedia", "wiktionary", "category"),
"#class" : wikimedia.WikimediaCategoryExtractor,
},
)