aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar D0rs4n <[email protected]>2021-08-20 21:24:54 +0200
committerGravatar GitHub <[email protected]>2021-08-20 21:24:54 +0200
commit601400a73ea09019af65d78ec45d1dcfe4229bec (patch)
treee844f70302803b9c4b0c615c6d58fa4505c2bc0e /bot
parentImprove code transparency in the Wikipedia Cog (diff)
Adjust code transparency in the Wikipedia Cog
Co-authored-by: Bluenix <[email protected]>
Diffstat (limited to 'bot')
-rw-r--r--bot/exts/evergreen/wikipedia.py3
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: