Created
September 19, 2017 16:27
-
-
Save jordanemedlock/a8259c011e262514ae27d7ca35aa40b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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