myanimelist.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Nurevam 作者: Maverun 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号