Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YouTube "Error 403: Forbidden" #24899

Closed
noembryo opened this issue Apr 20, 2020 · 7 comments
Closed

YouTube "Error 403: Forbidden" #24899

noembryo opened this issue Apr 20, 2020 · 7 comments
Labels

Comments

@noembryo
Copy link

@noembryo noembryo commented Apr 20, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.03.24
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

[debug] Encodings: locale cp1253, fs utf-8, out UTF-8, pref cp1253
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.7.2 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 3.0, ffprobe 3.0
[debug] Proxy map: {}
[youtube] KdSvdwjaQX0: Downloading webpage
[youtube] {18} signature length 104, html5 player vflset
[youtube] {135} signature length 104, html5 player vflset
[youtube] {244} signature length 108, html5 player vflset
[youtube] {134} signature length 108, html5 player vflset
[youtube] {243} signature length 108, html5 player vflset
[youtube] {133} signature length 108, html5 player vflset
[youtube] {242} signature length 108, html5 player vflset
[youtube] {160} signature length 108, html5 player vflset
[youtube] {278} signature length 108, html5 player vflset
[youtube] {140} signature length 108, html5 player vflset
[youtube] {249} signature length 104, html5 player vflset
[youtube] {250} signature length 108, html5 player vflset
[youtube] {251} signature length 108, html5 player vflset
[debug] Invoking downloader on 'https://r4---sn-4vguioxu-5ui6.googlevideo.com/videoplayback?expire=1587405588&ei=tI6dXtbwIIG8gQff0414&ip=130.43.78.26&id=o-AA6OvpT_B7dKDWIl3k0tJgGMuNRs8WdaX9dPJZRcM2eF&itag=18&source=youtube&requiressl=yes&mh=XT&mm=31%2C29&mn=sn-4vguioxu-5ui6%2Csn-nv47lnly&ms=au%2Crdu&mv=m&mvi=3&pcm2cms=yes&pl=18&initcwndbps=535000&vprv=1&mime=video%2Fmp4&gir=yes&clen=8693239&ratebypass=yes&dur=194.652&lmt=1537257463210926&mt=1587383916&fvip=4&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=ALrAebAwRgIhAKxN8r2I3vVcJvCq_r0BWDLUkYeNN90nxn2-wu0R8CbWAiEA6-6h_SYdQw_GRJQbtxWz-nkjHnVJMJhOZRSwJJRUd60%3D&sig=lLswRAIYQyRQk_DYtDyUmAVUlzeQW5AHRyQW0vAoThoag4R4kg0wIGvPXaksJaLozjDvtP5W1MUOYbty5a4KMBySFvMAsCKwKzK7'
ERROR: unable to download video data: HTTP Error 403: Forbidden
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "D:\Apps\DEV\PYTHON\Python3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1926, in process_info
    success = dl(filename, info_dict)
  File "D:\Apps\DEV\PYTHON\Python3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "D:\Apps\DEV\PYTHON\Python3\lib\site-packages\youtube_dl\downloader\common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "D:\Apps\DEV\PYTHON\Python3\lib\site-packages\youtube_dl\downloader\http.py", line 341, in real_download
    establish_connection()
  File "D:\Apps\DEV\PYTHON\Python3\lib\site-packages\youtube_dl\downloader\http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "D:\Apps\DEV\PYTHON\Python3\lib\site-packages\youtube_dl\YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "D:\Apps\DEV\PYTHON\Python3\lib\urllib\request.py", line 531, in open
    response = meth(req, response)
  File "D:\Apps\DEV\PYTHON\Python3\lib\urllib\request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "D:\Apps\DEV\PYTHON\Python3\lib\urllib\request.py", line 569, in error
    return self._call_chain(*args)
  File "D:\Apps\DEV\PYTHON\Python3\lib\urllib\request.py", line 503, in _call_chain
    result = func(*args)
  File "D:\Apps\DEV\PYTHON\Python3\lib\urllib\request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

Description

This error started some 10-12 hours ago.
Checked it with other urls, and with Python 2.
Its not videos that need age authentication or something similar.

@dstftw dstftw closed this Apr 20, 2020
@dstftw dstftw added the duplicate label Apr 20, 2020
@noembryo
Copy link
Author

@noembryo noembryo commented Apr 20, 2020

Its duplicate with what?

@noembryo
Copy link
Author

@noembryo noembryo commented Apr 20, 2020

Can you please re-open this?
There is no other active issue like this.

@gregf
Copy link

@gregf gregf commented Apr 20, 2020

I'm having the same issue right now, would like to know what it's a duplicate of as well.

@CptCaptain
Copy link

@CptCaptain CptCaptain commented Apr 20, 2020

I had a similar issue, I'm guessing this is a duplicate of #23638.
Have you tried --rm-cache-dir?

@gregf
Copy link

@gregf gregf commented Apr 20, 2020

@CptCaptain --rm-cache-dir solved it for me, thank you.

@noembryo
Copy link
Author

@noembryo noembryo commented Apr 20, 2020

I use youtube_dl as a library, so I added "rm_cachedir": True to the options but I get the same error.

EDIT: OK found it. I had to:

with youtube_dl.YoutubeDL(opts) as ydl:
    try:
        ydl.cache.remove()
        ydl.download([url])
    except youtube_dl.utils.DownloadError as err:
        print(err)

Thank you guys!

@gaussey
Copy link

@gaussey gaussey commented Apr 23, 2020

I use youtube_dl as a library, so I added "rm_cachedir": True to the options but I get the same error.

EDIT: OK found it. I had to:

with youtube_dl.YoutubeDL(opts) as ydl:
    try:
        ydl.cache.remove()
        ydl.download([url])
    except youtube_dl.utils.DownloadError as err:
        print(err)

Thank you guys!

Using that amendment fixed it on YouTube iOS (Pythonista) also, so thank you for that.

with YoutubeDL(opts) as ydl:

   try:
       ydl.cache.remove()
       ydl.download([url])
   except youtube_dl.utils.DownloadError as err:
       print(err)
ydl.download([url])
@a-raccoon a-raccoon mentioned this issue Apr 30, 2020
3 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants
You can’t perform that action at this time.