def get_pic(self, playingsong, tempfile_path):
        '''获取专辑封面'''
        url = playingsong['picture'].replace('\\', '')
        for _ in range(3):
            try:
                urllib.urlretrieve(url, tempfile_path)
                logger.debug('Get cover art success!')
                return True
            except (IOError, urllib.ContentTooShortError):
                pass
        logger.error('Get cover art failed!')
        return False
def get_pic ( self , playingsong , tempfile_path ) : url = playingsong [ 'picture' ] . replace ( '\\' , '' ) for _ in range ( 3 ) : try : urllib . urlretrieve ( url , tempfile_path ) logger . debug ( 'Get cover art success!' ) return True except ( IOError , urllib . ContentTooShortError ) : pass logger . error ( 'Get cover art failed!' ) return False
获取专辑封面