mediawiki-utilities / python-mwapi

Simple Python Wrapper around MediaWiki API
http://pythonhosted.org/mwapi
MIT License
31 stars 11 forks source link

Clean up README.md #41

Closed lucaswerkmeister closed 4 years ago

lucaswerkmeister commented 4 years ago

Fix a typo, update a link to HTTPS and lightly rephrase the first paragraph.

lucaswerkmeister commented 4 years ago

I also suspect there’s a bug in the continuation example:

for portion in continued:
    try:
        if 'query' in portion:
            for page in portion['query']['pages']:
                pages.append(page['title'])
        else:
            print("Mediwiki returned empty result batch.")
    except APIError:
        raise ValueError(
            "MediaWiki returned an error:", str(APIError)
        )

If there is an API error, it wouldn’t be raised in the section guarded by the try, but elsewhere, right? (cc @yurkobb)

halfak commented 4 years ago

Looks good to me.

halfak commented 4 years ago

Thanks for the cleanup!

lucaswerkmeister commented 4 years ago

Thanks for merging!