Exemple #1
0
 def download(self):
     startnum = self.startnum.text()
     endnum = self.endnum.text()
     name = unquote(NAME)
     if startnum == '':
         startnum = self.dname[self.n-13][0]
     if endnum == '':
         endnum = self.dname[self.n-1][0]
     downloadlist = []
     for a in range(int(startnum),int(endnum)+1):
         self.loginfo.append('>start download %dth of (%s to %s)<\n' %(a,startnum,endnum))
         self.loginfo.append('downloading %dth,please wait......\n' %a)
         QApplication.processEvents()           #立即显示输出的内容
         self.loginfo.moveCursor(QtGui.QTextCursor.End)  #光标置底
         downloadvideo(a,self.dname[a-1][1],name)
         self.loginfo.append('>%dth was downloaded<\n' %a)
         self.loginfo.moveCursor(QtGui.QTextCursor.End)
Exemple #2
0
 def on_downloadbtn_clicked(self):
     """
     Slot documentation goes here.
     """
     startnum = self.startnum.text()
     endnum = self.endnum.text()
     print startnum,endnum
     name = unquote(NAME)
     if startnum == '':
         startnum = self.dname[self.n-13][0]
     if endnum == '':
         endnum = self.dname[self.n-1][0]
     downloadlist = []
     print name,self.n
     print startnum,endnum
     for a in range(int(startnum),int(endnum)+1):
         self.loginfo.append('>start download %dth of (%s to %s)<\n' %(a,startnum,endnum))
         self.loginfo.append('downloading %dth,please wait......\n' %a)
         QApplication.processEvents()           #立即显示输出的内容
         downloadvideo(a,self.dname[a-1][1],name)
         self.loginfo.append('>%dth was downloaded<\n' %a)
     # TODO: not implemented yet
     raise NotImplementedError