def loadCookies(self): with open(self.mediaListCookiesFolder, 'rb') as f: self.mediaList = pickle.load(f) with open(self.musicsCookiesFolder, 'rb') as f: self.musics = pickle.load(f) for index, url in enumerate(self.musics): if '?vkey=' in url: musicInfo = self.mediaList.pop(url) url = url.split('qq.com/') url2 = url[1].split('?vkey=')[0] url = '{0}'.format(qqApi.sip) + url2 + '?vkey={0}'.format(qqApi.key) +\ '&guid={0}'.format(qqApi.guid) self.musics[index] = url.format(qqApi.sip, qqApi.key) self.mediaList[url] = musicInfo
def loadCookies(self): with open(self.musicListCookiesFolder, 'rb') as f: self.musicList = pickle.load(f) for i in self.musicList: self.addPlayList(i['name'], i['author'], i['time'])
def loadCookies(self): with open(self.musicsCookiesFolder, 'rb') as f: self.musics = pickle.load(f) with open(self.mediaListCookiesFolder, 'rb') as f: self.mediaList = pickle.load(f)