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