def get_data(self, category, name):
try:
with aiohttp.ClientSession(auth=self.auth,headers=self.header) as session:
async with session.get('https://myanimelist.net/api/{}/search.xml?q={}'.format(category, name),headers=self.header) as resp:
return (await resp.read())
except aiohttp.ClientResponseError: # some reason, mal dont return API, just nothing... causing error
return None
评论列表
文章目录