Last active
August 29, 2015 14:21
-
-
Save kirkbyo/96a6315b7151e45098f1 to your computer and use it in GitHub Desktop.
Downloads Youtube Videos from .txt
This file contains hidden or 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
import pafy | |
""" Dependencies: | |
- pafy: https://github.com/np1/pafy | |
""" | |
fileObject = open("songs.txt", "r") | |
fileText = fileObject.read() | |
links = fileText.split("\n") | |
for url in links: | |
if (url != ""): | |
video = pafy.new(url) | |
audio = video.getbestaudio() | |
audio.download(quiet=False) |
This file contains hidden or 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
https://www.youtube.com/watch?v=xHRkHFxD-xY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment