1
0
Fork 0
mirror of synced 2024-06-03 03:04:33 +12:00

Corrected syntax error

This commit is contained in:
Phxntxm 2016-07-24 08:51:04 -05:00
parent 5474a994ee
commit 4792225061

View file

@ -18,7 +18,7 @@ class Links:
"""Pulls the top urbandictionary.com definition for a term"""
try:
url = "http://api.urbandictionary.com/v0/define?term={}".format('+'.join(msg))
with aihttp.ClientSession() as s:
with aiohttp.ClientSession() as s:
async with s.get(url) as r:
response = await r.text()
data = json.loads(response)
@ -43,7 +43,7 @@ class Links:
url += ",+explicit&filter_id=95938"
# Get the response from derpibooru and parse the 'searc' result from it
with aihttp.ClientSession() as s:
with aiohttp.ClientSession() as s:
async with s.get(url) as r:
response = await r.text()
@ -80,7 +80,7 @@ class Links:
else:
url += "%20rating:safe"
with aihttp.ClientSession() as s:
with aiohttp.ClientSession() as s:
async with s.get(url) as r:
response = await r.text()