p697 / cloudmusic

网易云爬虫解决方案
http://cloudmusic.cool/
MIT License
101 stars 30 forks source link

只能获取歌单的前20首歌曲,请问可以修改参数获取歌单全部歌曲吗,谢谢 #4

Open wujiajia2017scnu opened 4 years ago

wujiajia2017scnu commented 4 years ago

import cloudmusic musiclist = cloudmusic.getPlaylist(2316863379)

通过歌单id来定位歌单

print(len(musiclist)) for music in musiclist: print("歌曲名称:{}".format(music.name))

wujiajia2017scnu commented 4 years ago

def get_playlist(self, para): url = "https://music.163.com/weapi/v3/playlist/detail" param = dict(id=para["ID"], total="true", limit=30, n=30, offest=21) return self.send(url, param)

修改 limit=30, n=30, offest=21, 获取结果仍然是前20个。

p697 commented 4 years ago

网易云刚刚更新了接口,我稍后将新的解决方案更新上。感谢你的issue

p697 commented 4 years ago

已经更新啦,快执行pip install --upgrade cloudmusic然后试试吧

wujiajia2017scnu commented 4 years ago

已经更新啦,快执行pip install --upgrade cloudmusic然后试试吧

感谢,大牛呀