Skip to content

Instantly share code, notes, and snippets.

@ming-chu
Created April 12, 2019 14:47
Show Gist options
  • Save ming-chu/1bae4e661a774f13a602a6560548c6f9 to your computer and use it in GitHub Desktop.
Save ming-chu/1bae4e661a774f13a602a6560548c6f9 to your computer and use it in GitHub Desktop.
Youtube mp4 download script in Python
from pytube import YouTube
links = [
'https://www.youtube.com/watch?v=S_0kr_CtdmY',
'https://youtu.be/1Qwx6PVfzjE',
'https://www.youtube.com/watch?v=jdAXaXg44S0',
'https://www.youtube.com/watch?v=DZX5fndRHSg',
'https://www.youtube.com/watch?v=RxZ3rjQn9dQ',
'https://youtu.be/4C7sanyeShY',
'https://youtu.be/T-BOPr7NXME',
'https://youtu.be/deJDIfS0Psk',
'https://youtu.be/Ki3LZ25rJoM',
'https://youtu.be/hvD8t7uzD7k',
'https://youtu.be/unZVgi2s9w8',
'https://youtu.be/pO2_D2iDz30',
'https://youtu.be/216Em4uAjY8',
'https://youtu.be/Nfg1LS5b5x8'
]
for link in links:
print(link)
yt = YouTube(link)
yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment