def test_parse_qsd(self): self.assertEqual({ "test": "1", "foo": "bar" }, parse_qsd("test=1&foo=bar", schema=validate.Schema({ "test": validate.text, "foo": "bar" })))
def _get_streams(self): # Get the query string encrypted_data = urlparse(self.url).query data = base64.b64decode(encrypted_data) # and decrypt it passphrase = self.passphrase() if passphrase: params = decrypt_openssl(data, passphrase) config = parse_qsd(params.decode("utf8")) return HLSStream.parse_variant_playlist( self.session, self.stream_url.format(time=self.time, deviceId=self.device_id, token=self.get_token(**config), **config))