Skip to content

Instantly share code, notes, and snippets.

@jordanemedlock
Created September 19, 2017 16:27
Show Gist options
  • Save jordanemedlock/a8259c011e262514ae27d7ca35aa40b0 to your computer and use it in GitHub Desktop.
Save jordanemedlock/a8259c011e262514ae27d7ca35aa40b0 to your computer and use it in GitHub Desktop.
from get_videos import find_videos
from youtube_download import download_video
import os
import sys
def download_whole_channel(channel_name):
if not os.path.exists(channel_name):
os.makedirs(channel_name)
for vid in find_videos(channel_name=channel_name):
download_video(video_id=vid['id'], folder=channel_name, finish=print)
if __name__ == '__main__':
if len(sys.argv) <= 1:
print('Missing channel name')
sys.exit(1)
download_whole_channel(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment