def get_first_song(self):
        """
        初始获取歌曲

        :params return: json
        """
        count = 3
        while count > 0:
            song = self.requests_url('n')
            if song:
                return song
            count -= 1
            time.sleep(2)
        raise GenericError('获取第一首歌曲失败，无法完成初始化')
def get_first_song ( self ) : count = 3 while count > 0 : song = self . requests_url ( 'n' ) if song : return song count -= 1 time . sleep ( 2 ) raise GenericError ( '获取第一首歌曲失败，无法完成初始化' )
初始获取歌曲

        :params return: json