diff options
author | 2021-08-20 21:24:54 +0200 | |
---|---|---|
committer | 2021-08-20 21:24:54 +0200 | |
commit | 601400a73ea09019af65d78ec45d1dcfe4229bec (patch) | |
tree | e844f70302803b9c4b0c615c6d58fa4505c2bc0e | |
parent | Improve code transparency in the Wikipedia Cog (diff) |
Adjust code transparency in the Wikipedia Cog
Co-authored-by: Bluenix <[email protected]>
-rw-r--r-- | bot/exts/evergreen/wikipedia.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/evergreen/wikipedia.py b/bot/exts/evergreen/wikipedia.py index 1b75f802..9397568d 100644 --- a/bot/exts/evergreen/wikipedia.py +++ b/bot/exts/evergreen/wikipedia.py @@ -58,9 +58,8 @@ class WikipediaSearch(commands.Cog): log.error(f"There was an error while communicating with the Wikipedia API: {error}") raise APIError("Wikipedia API", status, error) - number_of_results = raw_data["query"]["searchinfo"]["totalhits"] lines = [] - if number_of_results: + if raw_data["query"]["searchinfo"]["totalhits"]: results = raw_data["query"]["search"] for article in results: |