download video to from pytube with a special name

Solutions on MaxInterview for download video to from pytube with a special name by the best coders in the world

showing results for - "download video to from pytube with a special name"
Isabella
19 Jan 2017
1import os
2from pytube import YouTube
3
4yt = YouTube('http://youtube.com/watch?v=9bZkp7q19f0')
5yt.streams.first().download()
6os.rename(yt.streams.first().default_filename, 'new_filename.ext')`