darknessomi / musicbox

网易云音乐命令行版本
MIT License
9.83k stars 1.58k forks source link

每日推荐异常推出 #529

Open zxt50330 opened 7 years ago

zxt50330 commented 7 years ago

Traceback (most recent call last): File "/Library/Python/2.7/site-packages/NEMbox/init.py", line 26, in start nembox_menu.start_fork(version) File "/Library/Python/2.7/site-packages/NEMbox/menu.py", line 177, in start_fork Menu().start() File "/Library/Python/2.7/site-packages/NEMbox/menu.py", line 334, in start self.dispatch_enter(idx) File "/Library/Python/2.7/site-packages/NEMbox/menu.py", line 629, in dispatch_enter self.choice_channel(idx) File "/Library/Python/2.7/site-packages/NEMbox/menu.py", line 897, in choice_channel self.datalist = self.netease.dig_info(myplaylist, self.datatype) File "/Library/Python/2.7/site-packages/NEMbox/api.py", line 620, in dig_info for i in range(0, len(data)): TypeError: object of type 'bool' has no len()

kigawas commented 7 years ago

我这里好的,可能是网络问题

zxt50330 commented 7 years ago

登录太久,cookie无效了,重新登录下就好啦

zxt50330 commented 7 years ago

api.py

def recommend_playlist(self):
    try:
        action = 'http://music.163.com/weapi/v1/discovery/recommend/songs?csrf_token='  # NOQA
        self.session.cookies.load()
        csrf = ''
        for cookie in self.session.cookies:
            if cookie.name == '__csrf':
                csrf = cookie.value
        if csrf == '':
            return False  # 这里直接返回false 导致后面出错
kigawas commented 7 years ago

okay 会在下个版本修复