Ejemplo n.º 1
0
def download_tracks(user_name, limit, output_folder):
    tracks = get_top_tracks(user_name, limit=limit)

    for track in tracks:
        youtube_url = youtube_url_for_track(track.item)

        if not youtube_url:
            print("Couldn't parse url for", track.item)
            continue

        try:
            download_video(youtube_url, output_folder)
        except:
            print("Unabled to download", youtube_url)
Ejemplo n.º 2
0
(3) Download YouTube Videos and Convert Into MP3

Downloading copyrighted YouTube videos is illegal!
I am not responsible for your downloads! Go at your own risk!

Copyright (c) NeuralNine 2020
''')

choice = input("Choice: ")

if choice == "1" or choice == "2":
    quality = input("Please choose a quality (low, medium, high, very high):")
    if choice == "2":
        link = input("Enter the link to the playlist: ")
        print("Downloading playlist...")
        youtube_downloader.download_playlist(link, quality)
        print("Download finished!")
    if choice == "1":
        links = youtube_downloader.input_links()
        for link in links:
            youtube_downloader.download_video(link, quality)
elif choice == "3":
    links = youtube_downloader.input_links()
    for link in links:
        print("Downloading...")
        filename = youtube_downloader.download_video(link, 'low')
        print("Converting...")
        file_converter.convert_to_mp3(filename)
else:
    print("Invalid input! Terminating...")