Compare commits

..

No commits in common. "83a8cfdc6c571d19140388d0f976cd7d18fc4727" and "323d9bc19bc6abbfb9daa3953d1f03709e796d64" have entirely different histories.

2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import hmac
import io import io
import json import json
import re import re
import struct
import time import time
import urllib.parse import urllib.parse
import uuid import uuid
@ -69,7 +70,7 @@ class AbemaLicenseRH(RequestHandler):
}) })
res = decode_base_n(license_response['k'], table=self._STRTABLE) res = decode_base_n(license_response['k'], table=self._STRTABLE)
encvideokey = list(res.to_bytes(16, 'big')) encvideokey = list(struct.pack('>QQ', res >> 64, res & 0xffffffffffffffff))
h = hmac.new( h = hmac.new(
binascii.unhexlify(self._HKEY), binascii.unhexlify(self._HKEY),

View File

@ -68,7 +68,7 @@ class ShemarooMeIE(InfoExtractor):
raise ExtractorError('Premium videos cannot be downloaded yet.', expected=True) raise ExtractorError('Premium videos cannot be downloaded yet.', expected=True)
url_data = base64.b64decode(data_json['new_play_url']) url_data = base64.b64decode(data_json['new_play_url'])
key = base64.b64decode(data_json['key']) key = base64.b64decode(data_json['key'])
iv = bytes(16) iv = bytes([0] * 16)
m3u8_url = unpad_pkcs7(aes_cbc_decrypt_bytes(url_data, key, iv)).decode('ascii') m3u8_url = unpad_pkcs7(aes_cbc_decrypt_bytes(url_data, key, iv)).decode('ascii')
headers = {'stream_key': data_json['stream_key']} headers = {'stream_key': data_json['stream_key']}
formats, m3u8_subs = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, fatal=False, headers=headers) formats, m3u8_subs = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, fatal=False, headers=headers)