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

403 on YouTube #3327

Closed
phihag opened this issue Jul 23, 2014 · 5 comments
Closed

403 on YouTube #3327

phihag opened this issue Jul 23, 2014 · 5 comments

Comments

@phihag
Copy link
Contributor

@phihag phihag commented Jul 23, 2014

Most likely, we need to adapt one of the non-signature parameters.

$ youtube-dl -v test:youtube_2
[debug] System config: []
[debug] User config: ['--age-limit', '179']
[debug] Command-line args: ['-v', 'test:youtube_2']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.07.23.2
[debug] Git HEAD: d799b47
[debug] Python version 2.7.8 - Linux-3.13-1-amd64-x86_64-with-debian-jessie-sid
[debug] Proxy map: {}
[TestURL] Test URL: https://www.youtube.com/watch?v=07FYdnEawAQ
[youtube] Setting language
[youtube] 07FYdnEawAQ: Downloading webpage
[youtube] 07FYdnEawAQ: Downloading video info webpage
[youtube] Confirming age
[youtube] 07FYdnEawAQ: Extracting video information
[youtube] encrypted signature length 88 (44.43), itag 22, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 43, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 18, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 5, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 36, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 17, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 137, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 248, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 136, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 247, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 135, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 244, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 245, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 246, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 134, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 243, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 133, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 242, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 160, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 140, flash player vflR76_Ta
[youtube] encrypted signature length 88 (44.43), itag 171, flash player vflR76_Ta
[debug] Invoking downloader on u'https://r9---sn-ab5l6nee.googlevideo.com/videoplayback?upn=r-8sssXql3g&requiressl=yes&key=yt5&ip=174.34.171.91&ratebypass=yes&ipbits=0&mv=m&sparams=id%2Cip%2Cipbits%2Citag%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&source=youtube&mws=yes&id=o-ACW4hy1Awvb3CQb5Ey3Yi4yZJwS1fN9pR7B-7w4VKVB0&ms=au&mt=1406077294&itag=22&sver=3&expire=1406098991&fexp=902408%2C924222%2C927622%2C934024%2C934030%2C946023&signature=A9BF9B06811BAED41650CD3F2AF15CCFC0D8096F70A.A42CC017FFCDFFD6307101355AEF0E0AEC30EF0CF'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "youtube_dl/YoutubeDL.py", line 1022, in process_info
    success = dl(filename, info_dict)
  File "youtube_dl/YoutubeDL.py", line 998, in dl
    return fd.download(name, info)
  File "youtube_dl/downloader/common.py", line 291, in download
    return self.real_download(filename, info_dict)
  File "youtube_dl/downloader/http.py", line 58, in real_download
    data = self.ydl.urlopen(request)
  File "youtube_dl/YoutubeDL.py", line 1231, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
@phihag
Copy link
Contributor Author

@phihag phihag commented Jul 23, 2014

Note that this is our age-gated test video. Maybe we need to tinker on 2c57c7f again?

@jaimeMF jaimeMF closed this in c084c93 Jul 23, 2014
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 23, 2014

We extract the sts parameter from the video webpage now.

@phihag
Copy link
Contributor Author

@phihag phihag commented Jul 23, 2014

Great!

@0xced
Copy link
Contributor

@0xced 0xced commented Sep 11, 2014

I am also using this video to test VEVO + age restriction and I noticed that something changed today. This video is no longer protected with a ciphered signature, its detailpage returns use_cipher_signature=False so we can extract the streams directly from url_encoded_fmt_stream_map without bothering with the js player.

You can use video pZ12_E5R3qc instead which is both age restricted and signature ciphered.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 11, 2014

That may be temporary, I get use_cipher_signature=True in the details page.

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
3 participants
You can’t perform that action at this time.