diff options
| author | 2019-11-26 14:14:38 +0000 | |
|---|---|---|
| committer | 2019-11-26 14:14:38 +0000 | |
| commit | c3ce47b19df90f734ff378d0e8cfdfcfc418518e (patch) | |
| tree | 7c9274ffced48788cd1b8c95e895e83bffbd4c81 | |
| parent | update CHANGELOG.md (diff) | |
| signature | ||
update wikipedia.py to use Response.json()
| -rw-r--r-- | modules/wikipedia.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/wikipedia.py b/modules/wikipedia.py index a94109ed..41ed7fdc 100644 --- a/modules/wikipedia.py +++ b/modules/wikipedia.py @@ -17,9 +17,9 @@ class Module(ModuleManager.BaseModule): "action": "query", "prop": "extracts", "titles": event["args"], "exintro": "", "explaintext": "", "exchars": "500", - "redirects": "", "format": "json"}, json=True) + "redirects": "", "format": "json"}).json() if page: - pages = page.data["query"]["pages"] + pages = page["query"]["pages"] article = list(pages.items())[0][1] if not "missing" in article: title, info = article["title"], article["extract"] |
