import os
from google.colab import drive
from google.colab import files
from google.colab import auth
drive.mount('/content/drive', force_remount=False)
#@title Video + Playlist Downloder - Simple Mode { vertical-output: true }
url = "https://www.youtube.com/watch?v=qPtScmB8CgA" #@param {type:"string"}
# max_filesize_mb = 1000 #@param { type: 'slider', min: 1, max: 1000}
playlist_start = 1 #@param { type: 'number' }
playlist_end = 10 #@param { type: 'number' }
#remove_everything = False #@param { type: 'boolean' }
start_downloading_immediately = True #@param { type: 'boolean' }
# Install + Import + Config
try: import youtube_dl
except:
! pip install youtube-dl
#if remove_everything:
#! rm -rf *
import youtube_dl
import google
# Download
# with youtube_dl.YoutubeDL({
# 'outtmpl': '%(title)s.%(ext)s',
# 'format': '18',
# 'playlist-start': playlist_start,
# 'playlist-end': playlist_end,
# 'max-filesize': f'{max_filesize_mb}M'
# }).download(urls.split());
! youtube-dl {url} --playlist-start {playlist_start} --playlist-end {playlist_end} --format 18
! zip compressed.zip *
if start_downloading_immediately:
google.colab.files.download('/content/drive/My Drive/compressed.zip')