def loadPreviewpics(self):
self.thumbnails = []
self.mythumbubeentries = None
self.index = 0
self.maxentries = 0
self.picloads = {}
self.mythumbubeentries = [self.video.thumbnailUrl]
self.maxentries = len(self.mythumbubeentries)-1
if self.mythumbubeentries:
currindex = 0
for entry in self.mythumbubeentries:
thumbID = self.video.id + str(currindex)
thumbnailFile = "/tmp/" + thumbID + ".jpg"
currPic = [currindex,thumbID,thumbnailFile,None]
self.thumbnails.append(currPic)
thumbnailUrl = None
thumbnailUrl = entry
if thumbnailUrl is not None:
client.downloadPage(thumbnailUrl,thumbnailFile).addCallback(self.fetchFinished,currindex,thumbID).addErrback(self.fetchFailed,currindex,thumbID)
currindex +=1
else:
pass
评论列表
文章目录