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-dl not working since one/few hour on debian #896

Closed
bascension opened this issue Jun 20, 2013 · 16 comments
Closed

youtube-dl not working since one/few hour on debian #896

bascension opened this issue Jun 20, 2013 · 16 comments
Labels
bug

Comments

@bascension
Copy link

@bascension bascension commented Jun 20, 2013

A few hours ago everything was working perfectly. Now not anymore. I see there was a new release today.

youtube-dl http://www.youtube.com/watch?v=fBt4VdlZLNI -F
[youtube] Setting language
[youtube] fBt4VdlZLNI: Downloading video webpage
[youtube] fBt4VdlZLNI: Downloading video info webpage
[youtube] fBt4VdlZLNI: Extracting video information
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/bin/youtube-dl/main.py", line 18, in
File "/bin/youtube-dl/youtube_dl/init.py", line 606, in main
File "/bin/youtube-dl/youtube_dl/init.py", line 590, in _real_main
File "/bin/youtube-dl/youtube_dl/FileDownloader.py", line 727, in download
File "/bin/youtube-dl/youtube_dl/FileDownloader.py", line 465, in extract_info
File "/bin/youtube-dl/youtube_dl/InfoExtractors.py", line 99, in extract
File "/bin/youtube-dl/youtube_dl/InfoExtractors.py", line 735, in _real_extract
KeyError: 'sig'

@phihag
Copy link
Contributor

@phihag phihag commented Jun 20, 2013

Debian is fast, but not that fast. The new release has been online for a couple of minutes. I'm looking into this error.

phihag added a commit that referenced this issue Jun 20, 2013
@bascension
Copy link
Author

@bascension bascension commented Jun 20, 2013

Thanks! Do you know when i can update to the new version with this fix?

@phihag
Copy link
Contributor

@phihag phihag commented Jun 20, 2013

Looks like a new video format, consisting of multiple small files that get then assembled (at least with the HTML5 player). We're working on supporting it, you'll get a notification when we implement the new format.

@bascension
Copy link
Author

@bascension bascension commented Jun 20, 2013

Thanks! I only had this problem on Vevo music videos on this moment.

@strex
Copy link

@strex strex commented Jun 20, 2013

It seems that the signature is now encrypted on vevo videos.
(use_cipher_signature=True)

@phihag
Copy link
Contributor

@phihag phihag commented Jun 20, 2013

@strex Where do you see that ID? For me, the video info looks like

type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22&url=http%3A%2F%2Fr1---sn-c0gnuoxu-582e.c.youtube.com%2Fvideoplayback%3Fnewshard%3Dyes%26gcr%3Dus%26fexp%3D900148%252C921047%252C928201%252C901208%252C929123%252C929915%252C929906%252C929907%252C929125%252C925714%252C929919%252C931202%252C912512%252C912515%252C912521%252C906838%252C904488%252C906840%252C931910%252C931913%252C932227%252C904830%252C919373%252C933701%252C904122%252C932211%252C900816%252C909421%252C912711%252C935000%252C935102%26ratebypass%3Dyes%26itag%3D46%26key%3Dyt1%26ip%3D184.22.246.172%26upn%3DbmKV-iW6JqA%26ipbits%3D8%26ms%3Dau%26cp%3DU0hWRldUU19MTENONl9PTldDOnlCbFRyTWNGOTZp%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26source%3Dyoutube%26mv%3Du%26id%3D7c1b7855d9592cd2%26expire%3D1371795272%26sver%3D3%26mt%3D1371771226&itag=46&s=81D1AD1AE2D2C2A1182E4281FC83C8629C5A85340BC9A.73EBF3B842AA6385E19A7D5EDA0467CB884E720A80A8&quality=hd1080&fallback_host=tc.v11.cache6.c.youtube.com

and the URLs like

http://r1---sn-c0gnuoxu-582e.c.youtube.com/videoplayback?sver=3&algorithm=throttle-factor&gir=yes&factor=1.25&key=yt1&id=7c1b7855d9592cd2&sparams=algorithm%2Cburst%2Cclen%2Ccp%2Cfactor%2Cgcr%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Clmt%2Clowtc%2Csource%2Cupn%2Cexpire&ipbits=8&source=youtube&mv=u&lowtc=yes&ip=184.22.246.172&clen=20421006&ms=au&mt=1371770220&burst=40&lmt=1361246166067130&expire=1371795272&newshard=yes&itag=135&fexp=909708%2C932229%2C904829%2C910207%2C929203%2C930901%2C921047%2C928201%2C901208%2C929123%2C929915%2C929906%2C929907%2C929125%2C925714%2C929919%2C931202%2C912512%2C912515%2C912521%2C904488%2C906840%2C931910%2C931913%2C904830%2C919373%2C933701%2C904122%2C926403%2C909421%2C912711%2C935102&upn=H9aVtokv9o0&cp=U0hWRldUU19MTENONl9PTldDOnpsbmtkdVphanow&gcr=us&cpn=tzU081Gg24nsnFiP&alr=yes&mime=video%2Fmp4&signature=256144F8F7EEFA5C715CF2FC1B42F30DF5B86B1E.41AF8C44E4777CFD056676018C6A7C1C60896AE2&ptk=vevo&oid=yZJtHRi2SvzOOKZfbA-GRA&ptchn=BridgitMendlerVEVO&pltype=content&range=431369-851611&keepalive=yes
@strex
Copy link

@strex strex commented Jun 20, 2013

You can see it in the get_video_info response.
For example: https://www.youtube.com/get_video_info?&video_id=oxqnFJ3lp5k&eurl=http%3A%2F%2Fwww%2Eyoutube%2Ecom%2F
Its at the end of the response, and it appears only in videos from vevo.

The normal formats are still available, now there are two maps with URLs, url_encoded_fmt_stream_map with the normal formats and adaptive_fmts with the multiple small files.

In videos which are not from vevo you can also see both maps, but: use_cipher_signature=False

@phihag
Copy link
Contributor

@phihag phihag commented Jun 20, 2013

Mmm, do you know any user agents that use the traditional videos? Both HTML5 and Flash use the adaptive ones for me.

@cinereous
Copy link

@cinereous cinereous commented Jun 21, 2013

I got here looking for information on this:
ERROR: 'sig'

Assuming this is the proper bug... it's not just on vevo videos: I saw the above for the first time, today, on four videos in a row. Watching in browser works fine. Likely not relevant, but they came from a friend in England... but they also appear to be very recent (within last month). Exact same thing as bascension:
youtube-dl http://www.youtube.com/watch?v=UxxajLWwzqY -F
[youtube] Setting language
[youtube] UxxajLWwzqY: Downloading video webpage
[youtube] UxxajLWwzqY: Downloading video info webpage
[youtube] UxxajLWwzqY: Extracting video information
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/bin/youtube-dl/main.py", line 18, in
File "/bin/youtube-dl/youtube_dl/init.py", line 606, in main
File "/bin/youtube-dl/youtube_dl/init.py", line 590, in _real_main
File "/bin/youtube-dl/youtube_dl/FileDownloader.py", line 727, in download
File "/bin/youtube-dl/youtube_dl/FileDownloader.py", line 465, in extract_info
File "/bin/youtube-dl/youtube_dl/InfoExtractors.py", line 99, in extract
File "/bin/youtube-dl/youtube_dl/InfoExtractors.py", line 735, in _real_extract
KeyError: 'sig'

Pardon this likely extremely ignorant question, but what's Chrome (Google Chrome 22.0.1229.26 (Official Build 153823) beta / OS Linux / WebKit 537.4 (@126825) ) able to do that there isn't an equivalent python library for?

@bascension
Copy link
Author

@bascension bascension commented Jun 21, 2013

Till now thanks your so busy with it :D. I hope it will working soon! Thanks a lot.

@awojnowski
Copy link
Contributor

@awojnowski awojnowski commented Jun 21, 2013

Basically they have replaced the sig key with s on videos with use_cipher_signature set to True. Here's an example dictionary:

fallback_host: "tc.v17.cache1.c.youtube.com"
itag: "46"
quality: "hd1080"
s: "1E7E233C5022902B9BDF56464492BEF5CFAEF867.9163CBC8081021E8AF14A434BBFC32A70195DB0BB0C0C"
type: "video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22"
url: "http%3A%2F%2Fr1---sn-ni5f-ttje.c.youtube.com%2Fvideoplayback%3Fms%3Dau%26ratebypass%3Dyes%26id%3Dfe60f17038e0f4fe%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D933401%252C924601%252C911403%252C914072%252C916612%252C919515%252C932700%252C911929%252C921047%252C928201%252C901208%252C929123%252C929915%252C929906%252C929907%252C929125%252C925714%252C929919%252C931202%252C912512%252C912515%252C912521%252C906838%252C904488%252C906840%252C931910%252C931913%252C932227%252C904830%252C919373%252C933701%252C904122%252C900816%252C909421%252C912711%252C935102%26mt%3D1371773066%26sver%3D3%26expire%3D1371798511%26gcr%3Dca%26newshard%3Dyes%26source%3Dyoutube%26upn%3Di2a9VeWOzdo%26cp%3DU0hWRldUVl9GS0NONl9PTlpGOmRxZmpRTkRreWJw%26ipbits%3D8%26key%3Dyt1%26ip%3D24.79.200.138%26itag%3D46%26mv%3Dm"

I'm working on finding a fix for this as well. @strex any ideas?

@cinereous
Copy link

@cinereous cinereous commented Jun 21, 2013

Is there anything we users can do to help out, with information?

I just noticed it's not just recent videos: One of the ones that fails for me:
youtube-dl http://www.youtube.com/watch?v=MKQDzpIwAMo -vvvv
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['http://www.youtube.com/watch?v=MKQDzpIwAMo', '-vvvv']
[debug] youtube-dl version 2013.06.21
[debug] Python version 2.7.3rc2 - Linux-3.5.3-
[debug] Proxy map: {}
[youtube] Setting language
[youtube] MKQDzpIwAMo: Downloading video webpage
[youtube] MKQDzpIwAMo: Downloading video info webpage
[youtube] MKQDzpIwAMo: Extracting video information
Traceback (most recent call last):
... (same as posted before)
KeyError: 'sig'

What's really unique is, I downloaded 20+ videos this morning (low bandwidth, so I do it while I'm sleeping)... no errors. And, also, one of the ones my friend sent worked, now. So, I can't see any rhyme or reason; why some would be changed(?) and others not...

@awojnowski
Copy link
Contributor

@awojnowski awojnowski commented Jun 21, 2013

@cinereous Basically they have only enabled this new use_cipher_signature key on Vevo videos. This only recently came into effect. I know for a fact that Vevo was functional this morning.

They had also rolled out these updates to the video page (watch?v= urls) roughly a week ago, thus breaking an application of mine that had used the actual video page instead of get_video_info.

@phihag
Copy link
Contributor

@phihag phihag commented Jun 21, 2013

Duplicate of #897.

@phihag phihag closed this Jun 21, 2013
@mikeygao
Copy link

@mikeygao mikeygao commented Jun 21, 2013

Is this issue fixed? I update the most latest and make new youtube-dl and run as below. Still can't get video. Use browser with url below, get access deny!

./youtube-dl -v -g -s https://www.youtube.com/watch?v=8UVNT4wvIGY
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-g', '-s', 'https://www.youtube.com/watch?v=8UVNT4wvIGY']
http://r20---sn-tt17rn7r.c.youtube.com/videoplayback?sver=3&itag=37&ratebypass=yes&ip=69.172.116.161&ms=au&fexp=935400%2C900504%2C908415%2C914051%2C916626%2C921047%2C928201%2C901208%2C929123%2C929915%2C929906%2C929907%2C929125%2C925714%2C929919%2C931202%2C912512%2C912515%2C912521%2C906838%2C904488%2C906840%2C931910%2C931913%2C932227%2C904830%2C919373%2C933701%2C904122%2C900816%2C909421%2C912711%2C935000%2C935102&mv=m&key=yt1&cp=U0hWRlhLU19IT0NONl9QRVdFOlBoYlRnMnl2NGR0&upn=rzjmFRiK0mg&newshard=yes&mt=1371781887&id=f1454d4f8c2f2066&ipbits=8&expire=1371805435&source=youtube&sparams=cp%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&gcr=ca

./youtube-dl https://www.youtube.com/watch?v=8UVNT4wvIGY
[youtube] Setting language
[youtube] 8UVNT4wvIGY: Downloading video webpage
[youtube] 8UVNT4wvIGY: Downloading video info webpage
[youtube] 8UVNT4wvIGY: Extracting video information
ERROR: unable to download video

@johnmcauley
Copy link

@johnmcauley johnmcauley commented Jun 23, 2013

I have the same problem

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