Skip to main content

Posts

Showing posts with the label youtube-dl

youtube-dl download using python in a specific folder and of a particular quality

import  subprocess import  tempfile import  os import  youtube_dl import  time class   MyLogger ( object ):      def   debug ( self ,  msg ):          pass      def   warning ( self ,  msg ):          pass      def   error ( self ,  msg ):          print (msg) def   my_hook ( d ):      if  d[ 'status' ] ==  'finished' :          print ( 'Done downloading, now converting ...' ) ydl_opts = {           'outtmpl' :  './temp/ZCL5.mp4' ,      'logger' : MyLogger(),      'progress_hooks' : [my_hook],  ...