newer mwclient, fix deprecation warning

This commit is contained in:
Daniel Lenski 2020-12-21 14:54:50 -08:00
parent 64da0d6b3e
commit c04f8849d2
3 changed files with 3 additions and 2 deletions

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
mwclient>=0.10.1

View File

@ -39,7 +39,7 @@ setup(name="wp2git",
long_description=open('README.md').read(),
author=open('AUTHORS').read(),
author_email="dlenski@gmail.com",
install_requires=[ 'mwclient>=0.8' ],
install_requires=open('requirements.txt').readlines(),
license=open('LICENSE').read(),
url="https://github.com/dlenski/wp2git",
packages=["wp2git"],

View File

@ -61,7 +61,7 @@ def main():
scheme, host, path = 'https', '%s.wikipedia.org' % args.lang, '/w/'
else:
scheme, host, path = 'https', 'wikipedia.org', '/w/'
site = mwclient.Site((scheme, host), path=path)
site = mwclient.Site(host, path=path, scheme=scheme)
print('Connected to %s://%s%s' % (scheme, host, path), file=stderr)
# Find the page