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] I couldn't find any video with an encrypted signature ? #1403

Closed
mdawar opened this issue Sep 10, 2013 · 4 comments
Closed

[youtube] I couldn't find any video with an encrypted signature ? #1403

mdawar opened this issue Sep 10, 2013 · 4 comments

Comments

@mdawar
Copy link
Contributor

@mdawar mdawar commented Sep 10, 2013

Hey guys, I don't know if it's just me but I was checking many videos' url_encoded_fmt_stream_map and I couldn't find the s parameter that you search for to get the encrypted signature and decrypt it, they all have the signature in the sig parameter and it doesn't need any decryption, and the code that I'm talking about that is responsible for this testing is in youtube.py:

https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L798

 m_s = re.search(r'[&,]s=', args['url_encoded_fmt_stream_map'])
 if m_s is not None:
     self.to_screen(u'%s: Encrypted signatures detected.' % video_id)

for example in the issue #942 on the video BrbxWOMpwfs, we get in the output:

[youtube] BrbxWOMpwfs: Encrypted signatures detected.

even though when I checked the video page and the url_encoded_fmt_stream_map I couldn't find the s parameter, we have there the signatures in the sigparameter which is not encrypted and I tested it and got a working stream url.

What I'm saying might be wrong, but I thought I should report this because I tested many videos that outputted the 'encrypted signatures detected' message but didn't have any encrypted signatures there.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 10, 2013

Well, I get the s parameter in the video you link: \u0026itag=134\u0026size=640x336\u0026init=0-707\u0026s=517717175E36DEC33F28D98BE0A99848CC7FF4.86063B70AE2EA9C54D774407AF4E3FF0DF350FE76AC4433, and if you get that message in youtube-dl it means you're also receiving it. How and where have you search for the s parameter?

@mdawar
Copy link
Contributor Author

@mdawar mdawar commented Sep 11, 2013

I'm searching for it in the Google Chrome console using Javascript:

var st = ytplayer.config.args.url_encoded_fmt_stream_map.split(',');

and then when I search for the s using indexOf() I get -1 which means not found:

st[0].indexOf('s='); // results in -1 (not found)

but when I search for the sig I get the index of it:

st[0].indexOf('sig='); // results in the index, in this case 65

I also tried searching for it manually and I didn't find it, could it be dependent on the geolocation ?
Take a look this, these are all the parameters of one of the streams of the video BrbxWOMpwfs

fallback_host = tc.v17.cache8.c.youtube.com
itag = 43
quality = medium
sig = 138E39BC97A776CC92E5C983E8BAEA99B7998E6C.060DFC0179C0021C5068243E489C60397D0FF6D8
type = video/webm; codecs = "vp8.0, vorbis"
url = http://r6---sn-25g7sn7z.c.youtube.com/videoplayback?upn = 9mvDmZgVb2s
id = 06b6f158e329c1fb
itag = 43
mt = 1378879912
gcr = lb
ms = au
cp = U0hWTVlLUl9OUENONl9RRVZIOjZlT1FxNTFQU2FL
sver = 3
source = youtube
expire = 1378904796
ip = 185.4.253.18
key = yt1
mv = m
ipbits = 8
ratebypass = yes
fexp = 923437,916904,919390,900381,916623,919515,930902,924606,929117,929121,929906,929907,929922,929127,929129,929131,929930,936403,925726,936310,925720,925722,925718,925714,929917,906945,929933,920302,906842,913428,920605,919811,913563,919373,930803,938701,931924,936308,909549,900816,912711,904494,904497,939903,900375,934507,907231,936312,906001
sparams = cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire

As you can see I have sig instead of the s parameter.
If it's dependent on the country then we have found something good, because I searched a lot of videos that are submitted in the issues about the encrypted signatures, and with all of them I didn't get a single encrypted signature, always the sig which is not encrypted.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 11, 2013

I follow the same steps and I still only get s=, as I've already said if youtube-dl says it has detected encrypted signatures, it means that there's the s= parameters, so you should also see it in Chrome.

@mdawar
Copy link
Contributor Author

@mdawar mdawar commented Sep 11, 2013

I tested the same video using a proxy (USA) and I got an encrypted signature s, so I think it depends on the country, for me I never got an encrypted signature.
Here are the results using a USA proxy:

itag = 43
s = C89C898307B133FD844786.41B3A74F809B66B94DF8C3476CC81329A0FCF935CADB125D00E3546EAC8400
quality = medium
type = video/webm; codecs = "vp8.0, vorbis"
url = http://r6---sn-vgqs7n7e.c.youtube.com/videoplayback?ratebypass = yes
gcr = us
sver = 3
ipbits = 8
itag = 43
ip = 198.204.238.254
key = yt1
sparams = cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire
fexp = 923437,916904,919390,900381,916623,919515,930902,924606,929117,929121,929906,929907,929922,929127,929129,929131,929930,936403,925726,936310,925720,925722,925718,925714,929917,906945,929933,920302,906842,913428,920605,919811,913563,919373,930803,938701,931924,936308,909549,900816,912711,904494,904497,939903,900375,934507,907231,936312,906001
ms = au
source = youtube
mv = m
upn = 5leZ3dcJv0E
id = 06b6f158e329c1fb
mt = 1378896120
cp = U0hWTVlMV19OUENONl9RRkFCOjZlT1FxNTJVTWFL
expire = 1378919196
fallback_host = tc.v17.cache8.c.youtube.com
@mdawar mdawar closed this Sep 12, 2013
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
2 participants
You can’t perform that action at this time.