async def test_get_album(self): async with baidu.BaiDu() as client: resp = await client.get_album('946499') self.assertIsNotNone(resp)
async def test_get_playlist(self): async with baidu.BaiDu() as client: resp = await client.get_playlist('566347665') self.assertIsNotNone(resp)
async def test_get_song(self): async with baidu.BaiDu() as client: resp = await client.get_song('1686649') self.assertIsNotNone(resp)
async def test_get_artist(self): async with baidu.BaiDu() as client: resp = await client.get_artist('1557') self.assertIsNotNone(resp)
async def test_search_songs(self): async with baidu.BaiDu() as client: resp = await client.search_songs('五月天') self.assertIsNotNone(resp)
async def get_playlist_from_qianqian(request: web.Request): return await get_playlist(baidu.BaiDu(), request.match_info['playlist_id'])
async def get_album_from_qianqian(request: web.Request): return await get_album(baidu.BaiDu(), request.match_info['album_id'])
async def get_song_from_qianqian(request: web.Request): return await get_song(baidu.BaiDu(), request.match_info['song_id'])
async def search_songs_from_qianqian(request: web.Request): return await search_songs(baidu.BaiDu(), request.match_info['keyword'])