I'm trying to download a YouTube video using it's url in python but I'm getting:
urllib.error.HTTPError: HTTP Error 403: Forbidden
I'm using the Python library pytube to download the youtube video. Here is my code:
#importing the module
from pytube import YouTube
my=YouTube("https://www.youtube.com/watch?v=R4em3LKQCAQ").streams.first()
my.download()
I'm getting the error like below
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden