fixed issues with third party family
This commit is contained in:
6
setup.py
6
setup.py
@@ -2,12 +2,16 @@
|
|||||||
Tools for downloading info from Wookieepedia
|
Tools for downloading info from Wookieepedia
|
||||||
"""
|
"""
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
from setuptools.command.install import install
|
||||||
|
from setuptools.command.develop import develop
|
||||||
|
import os
|
||||||
|
from setuptools.command.egg_info import egg_info
|
||||||
|
|
||||||
dependencies = ['click', 'pywikibot', 'pymediawiki', 'mwparserfromhell']
|
dependencies = ['click', 'pywikibot', 'pymediawiki', 'mwparserfromhell']
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='wookieedl',
|
name='wookieedl',
|
||||||
version='0.1.0',
|
version='0.1.1',
|
||||||
url='https://github.com/anthonyscorrea/wookiee-dl',
|
url='https://github.com/anthonyscorrea/wookiee-dl',
|
||||||
license='BSD',
|
license='BSD',
|
||||||
author='Anthony Correa',
|
author='Anthony Correa',
|
||||||
|
|||||||
3
tox.ini
3
tox.ini
@@ -15,10 +15,7 @@ deps =
|
|||||||
|
|
||||||
commands =
|
commands =
|
||||||
;Generate pywikibot family file
|
;Generate pywikibot family file
|
||||||
python -m pywikibot.scripts.generate_family_file "https://starwars.fandom.com/wiki/Main_Page" "wookieepedia" "n" "n"
|
|
||||||
python -m unittest discover
|
python -m unittest discover
|
||||||
;remove pywikibot family file
|
|
||||||
rm -rf ./families
|
|
||||||
|
|
||||||
[testenv:black]
|
[testenv:black]
|
||||||
deps =
|
deps =
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ import os
|
|||||||
import click
|
import click
|
||||||
import mediawiki
|
import mediawiki
|
||||||
from pywikibot import FilePage, Page, Site
|
from pywikibot import FilePage, Page, Site
|
||||||
|
from wookiee_dl.wookieepedia_family import Family as WookieepediaFamily
|
||||||
|
|
||||||
site = Site("en", "wookieepedia")
|
site = Site("en", fam=WookieepediaFamily())
|
||||||
site_mw = mediawiki.MediaWiki("https://starwars.fandom.com/api.php")
|
site_mw = mediawiki.MediaWiki("https://starwars.fandom.com/api.php")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
28
wookiee_dl/wookieepedia_family.py
Normal file
28
wookiee_dl/wookieepedia_family.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
"""
|
||||||
|
This family file was auto-generated by generate_family_file.py script.
|
||||||
|
|
||||||
|
Configuration parameters:
|
||||||
|
url = https://starwars.fandom.com/wiki/Main_Page
|
||||||
|
name = wookieepedia
|
||||||
|
|
||||||
|
Please do not commit this to the Git repository!
|
||||||
|
"""
|
||||||
|
from pywikibot import family
|
||||||
|
|
||||||
|
|
||||||
|
class Family(family.Family): # noqa: D101
|
||||||
|
|
||||||
|
name = "wookieepedia"
|
||||||
|
langs = {
|
||||||
|
"en": "starwars.fandom.com",
|
||||||
|
}
|
||||||
|
|
||||||
|
def scriptpath(self, code):
|
||||||
|
return {
|
||||||
|
"en": "",
|
||||||
|
}[code]
|
||||||
|
|
||||||
|
def protocol(self, code):
|
||||||
|
return {
|
||||||
|
"en": "https",
|
||||||
|
}[code]
|
||||||
Reference in New Issue
Block a user