Reputation: 19
Code:
from pytube import Playlist
playlist = Playlist('https://www.youtube.com/playlist?list=PLWPirh4EWFpEpO6NjjWLbKSCb-wx3hMql')
for video in playlist.videos:
print("Video: ",video)
video.streams.get_highest_resolution().download()
Error I am getting:
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
Upvotes: 0
Views: 7529
Reputation: 66
Worked for me, You have to go to directory /Applications/Python3.x and then run sudo sh ./Install\ Certificates.command
Upvotes: 0
Reputation: 455
# Solved in
# add
import ssl
ssl._create_default_https_context = ssl._create_stdlib_context
Upvotes: 2
Reputation: 51
(for OSX users) In another words...
Upvotes: 5
Reputation: 11
Go to /Applications/Python3.x and run 'Install Certificates.command'
Upvotes: 1