aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/theplatform.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-10-09 23:50:53 +0700
committerSergey M․ <dstftw@gmail.com>2017-10-09 23:50:53 +0700
commit197224b7a4e37a6581bf1a0da18d0f67ea61a476 (patch)
treec2cd8cac66667b65610ca7dc279d0fe98c87ae50 /youtube_dl/extractor/theplatform.py
parent89923316210f8e17bb1a085278940e1c56fcff48 (diff)
Fix some regexes
Diffstat (limited to 'youtube_dl/extractor/theplatform.py')
-rw-r--r--youtube_dl/extractor/theplatform.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py
index de236bbba..b1a985ff6 100644
--- a/youtube_dl/extractor/theplatform.py
+++ b/youtube_dl/extractor/theplatform.py
@@ -216,7 +216,7 @@ class ThePlatformIE(ThePlatformBaseIE, AdobePassIE):
def hex_to_bytes(hex):
return binascii.a2b_hex(hex.encode('ascii'))
- relative_path = re.match(r'https?://link.theplatform.com/s/([^?]+)', url).group(1)
+ relative_path = re.match(r'https?://link\.theplatform\.com/s/([^?]+)', url).group(1)
clear_text = hex_to_bytes(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)