Пример #1
0
    def download(self):
        print "Start downloading " + self.url
        
        #download youtube info
        if self.get_youtube_info()==False:
            return False
        signature = self.download_stream_info["sig"]
        url = self.download_stream_info["url"]
        download_url = "%s&signature=%s" % (url, signature)
        if self.output_file_name=="FF":
            dmn = Download( download_url, self.title)
            self.output_file_name = self.title
        else:
            dmn = Download( download_url, self.output_file_name)
        dmn.download()

        print "\nConverting:\n"
        ofile = "result_"+self.output_file_name+"."+self.ofe
        print ofile
        con = Converter( self.output_file_name,  ofile)
        
        con.ffmpeg_converter(self.audio_codec,self.video_codec)
        
        return True