From c3ce47b19df90f734ff378d0e8cfdfcfc418518e Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 26 Nov 2019 14:14:38 +0000 Subject: [PATCH] update wikipedia.py to use Response.json() --- modules/wikipedia.py | 4 ++-- 1 file 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"]