def expand(self, ctx, url):
"""Expand goo.gl url"""
key = self.loadapi["ApiKey"]
async with aiohttp.ClientSession() as session:
async with session.get('https://www.googleapis.com/urlshortener/v1/url?key=' + key + '&shortUrl=' + url) as resp:
print(resp.status)
yes = await resp.json()
await self.bot.say(yes['longUrl'])
评论列表
文章目录