diff options
| author | remitamine <remitamine@gmail.com> | 2016-04-01 09:55:46 +0100 | 
|---|---|---|
| committer | remitamine <remitamine@gmail.com> | 2016-04-01 09:58:02 +0100 | 
| commit | db1c969da5dc22b36228b50ac2c09f3a50dd17ae (patch) | |
| tree | 2df0c3e2b8b20934283cf5636e0dfc4016ec6c00 | |
| parent | 1e02bc7ba28bfb5859dcd0c8d960b965d9c59f12 (diff) | |
[theplatform] sign https urls
| -rw-r--r-- | youtube_dl/extractor/theplatform.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py index 236c99972..bf6f82f5a 100644 --- a/youtube_dl/extractor/theplatform.py +++ b/youtube_dl/extractor/theplatform.py @@ -154,7 +154,7 @@ class ThePlatformIE(ThePlatformBaseIE):          def hex_to_str(hex):              return binascii.a2b_hex(hex) -        relative_path = url.split('http://link.theplatform.com/s/')[1].split('?')[0] +        relative_path = re.match(r'https?://link.theplatform.com/s/([^?]+)', url).group(1)          clear_text = hex_to_str(flags + expiration_date + str_to_hex(relative_path))          checksum = hmac.new(sig_key.encode('ascii'), clear_text, hashlib.sha1).hexdigest()          sig = flags + expiration_date + checksum + str_to_hex(sig_secret) | 
