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) HTTP/403 on videoplayback from YT Music URL #24983

Closed
An0nDev opened this issue Apr 25, 2020 · 1 comment
Closed

(YouTube) HTTP/403 on videoplayback from YT Music URL #24983

An0nDev opened this issue Apr 25, 2020 · 1 comment

Comments

@An0nDev
Copy link

@An0nDev An0nDev commented Apr 25, 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

C:\Users\Eric>youtube-dl -f 251 -v https://youtube.com/watch?v=bOfLZiO2MZk
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', '251', '-v', 'https://youtube.com/watch?v=bOfLZiO2MZk']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.8.1 (CPython) - Windows-10-10.0.19592-SP0
[debug] exe versions: ffmpeg git-2020-02-05-e6891d1, ffprobe git-2020-02-05-e6891d1
[debug] Proxy map: {}
[youtube] bOfLZiO2MZk: Downloading webpage
[youtube] {18} signature length 104, html5 player vflset
[youtube] {137} signature length 104, html5 player vflset
[youtube] {248} signature length 104, html5 player vflset
[youtube] {399} signature length 104, html5 player vflset
[youtube] {136} signature length 104, html5 player vflset
[youtube] {247} signature length 104, html5 player vflset
[youtube] {398} signature length 104, html5 player vflset
[youtube] {135} signature length 104, html5 player vflset
[youtube] {244} signature length 104, html5 player vflset
[youtube] {397} signature length 104, html5 player vflset
[youtube] {134} signature length 100, html5 player vflset
[youtube] {243} signature length 104, html5 player vflset
[youtube] {396} signature length 100, html5 player vflset
[youtube] {133} signature length 104, html5 player vflset
[youtube] {242} signature length 104, html5 player vflset
[youtube] {395} signature length 104, html5 player vflset
[youtube] {160} signature length 100, html5 player vflset
[youtube] {278} signature length 104, html5 player vflset
[youtube] {394} signature length 104, html5 player vflset
[youtube] {140} signature length 104, html5 player vflset
[youtube] {249} signature length 104, html5 player vflset
[youtube] {250} signature length 100, html5 player vflset
[youtube] {251} signature length 104, html5 player vflset
[debug] Invoking downloader on 'https://r2---sn-p5qs7nee.googlevideo.com/videoplayback?expire=1587796592&ei=EIajXuaQLdLYDtS5kpgK&ip=2605%3Aa000%3A1203%3A8177%3Ac538%3A371a%3A7390%3A18b1&id=o-AOjWq1zgwYId4Tx6M2UPT7a5cD9-RYc34IcV9x01_HKL&itag=251&source=youtube&requiressl=yes&mh=PS&mm=31%2C29&mn=sn-p5qs7nee%2Csn-p5qlsnz6&ms=au%2Crdu&mv=m&mvi=1&pl=39&gcr=us&initcwndbps=1666250&vprv=1&mime=audio%2Fwebm&gir=yes&clen=4129465&dur=236.521&lmt=1586029715772656&mt=1587774870&fvip=2&keepalive=yes&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ALrAebAwRgIhALkEjpR2mXz4nZpQUL45fA0efgxNxhneuBGCY17iik6TAiEA6WaIMvTQBsnlkEToQrukzcnSUmFgVRyD20K4LyJZKeM%3D&sig=yMA-m0CrSaDpfb83QyBFu33nd=4eq3MW3ehlC_NW-pUwAEiAdjILun4sgEqLAGgYxl6TA7u-dC6g4Cw6dx6ATHpon2IAhIgRwpLC&ratebypass=yes'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "c:\users\eric\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 1926, in process_info
    success = dl(filename, info_dict)
  File "c:\users\eric\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "c:\users\eric\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\downloader\common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "c:\users\eric\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\downloader\http.py", line 341, in real_download
    establish_connection()
  File "c:\users\eric\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\downloader\http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "c:\users\eric\appdata\local\programs\python\python38\lib\site-packages\youtube_dl\YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "c:\users\eric\appdata\local\programs\python\python38\lib\urllib\request.py", line 531, in open
    response = meth(req, response)
  File "c:\users\eric\appdata\local\programs\python\python38\lib\urllib\request.py", line 640, in http_response
    response = self.parent.error(
  File "c:\users\eric\appdata\local\programs\python\python38\lib\urllib\request.py", line 569, in error
    return self._call_chain(*args)
  File "c:\users\eric\appdata\local\programs\python\python38\lib\urllib\request.py", line 502, in _call_chain
    result = func(*args)
  File "c:\users\eric\appdata\local\programs\python\python38\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

I'm trying to download the YouTube version of a YouTube Music song, which is available from this URL. It's not 100% consistent; the download usually works after a few tries, but I never have any issues when playing the video/song through YouTube or the Music client. Here's an output where the download successfully completes, executed a few minutes after the output shown above.

C:\Users\Eric>youtube-dl -f 251 -v https://youtube.com/watch?v=bOfLZiO2MZk
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', '251', '-v', 'https://youtube.com/watch?v=bOfLZiO2MZk']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.8.1 (CPython) - Windows-10-10.0.19592-SP0
[debug] exe versions: ffmpeg git-2020-02-05-e6891d1, ffprobe git-2020-02-05-e6891d1
[debug] Proxy map: {}
[youtube] bOfLZiO2MZk: Downloading webpage
[youtube] {18} signature length 100, html5 player vflset
[youtube] {137} signature length 100, html5 player vflset
[youtube] {248} signature length 100, html5 player vflset
[youtube] {399} signature length 104, html5 player vflset
[youtube] {136} signature length 100, html5 player vflset
[youtube] {247} signature length 104, html5 player vflset
[youtube] {398} signature length 104, html5 player vflset
[youtube] {135} signature length 104, html5 player vflset
[youtube] {244} signature length 104, html5 player vflset
[youtube] {397} signature length 104, html5 player vflset
[youtube] {134} signature length 104, html5 player vflset
[youtube] {243} signature length 104, html5 player vflset
[youtube] {396} signature length 104, html5 player vflset
[youtube] {133} signature length 104, html5 player vflset
[youtube] {242} signature length 104, html5 player vflset
[youtube] {395} signature length 104, html5 player vflset
[youtube] {160} signature length 104, html5 player vflset
[youtube] {278} signature length 104, html5 player vflset
[youtube] {394} signature length 100, html5 player vflset
[youtube] {140} signature length 100, html5 player vflset
[youtube] {249} signature length 104, html5 player vflset
[youtube] {250} signature length 104, html5 player vflset
[youtube] {251} signature length 100, html5 player vflset
[debug] Invoking downloader on 'https://r2---sn-p5qs7nee.googlevideo.com/videoplayback?expire=1587796818&ei=8oajXtKvH8H3Dc-ftMgM&ip=2605%3Aa000%3A1203%3A8177%3Ac538%3A371a%3A7390%3A18b1&id=o-AA03HOSxmJhCT1OTMJBZ8WLQSyeHnXv5IgVZs9W8M4a9&itag=251&source=youtube&requiressl=yes&mh=PS&mm=31%2C26&mn=sn-p5qs7nee%2Csn-vgqsknez&ms=au%2Conr&mv=m&mvi=1&pl=39&gcr=us&initcwndbps=1733750&vprv=1&mime=audio%2Fwebm&gir=yes&clen=4129465&dur=236.521&lmt=1586029715772656&mt=1587775179&fvip=2&keepalive=yes&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ALrAebAwRgIhAK8aJpPSxUXu3O3SDAlJu8gv8YgdKdxjf3_9gDfpWeQFAiEAyayfDW7zXXWMlGi0dqKVpddTxsVxdUh9LoFp1kvDDoQ%3D&sig=AJpPlLswRAIgcrhPOYghsDAXtaUGWeg49tS2FKBAiE7RSJXOms_kVooCICE8hp859RO-3YPqHxn3cIGCkHmTh-hVsUmMtC6BD0VH&ratebypass=yes'
[download] Destination: Isis (feat. Logic)-bOfLZiO2MZk.webm
[download] 100% of 3.94MiB in 00:00

Including or excluding the format specifier doesn't appear to have any effect on the error rate.

Thanks so much; I love your program! <3

@An0nDev
Copy link
Author

@An0nDev An0nDev commented Apr 25, 2020

My bad; missed the sticky thread. --rm-cache-dir fixed the issue.

@An0nDev An0nDev closed this Apr 25, 2020
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.

None yet
1 participant
You can’t perform that action at this time.