Merge pull request #6 from es3n1n/main

refactor: use get_token from re_unplayplay
This commit is contained in:
Rafael Moraes
2024-09-29 20:46:13 -03:00
committed by GitHub
+3 -2
View File
@@ -12,9 +12,10 @@ from pathlib import Path
try:
re_unpp_exc: ImportError | None = None
from re_unplayplay import decrypt_and_bind_key
from re_unplayplay import decrypt_and_bind_key, get_token
except ImportError as err:
decrypt_and_bind_key = lambda a, b: None
get_token = lambda: None
re_unpp_exc = err
import requests
@@ -369,7 +370,7 @@ class Downloader:
def get_playplay_decryption_key(self, file_id: str) -> bytes:
playplay_license_request = PlayPlayLicenseRequest(
version=2,
token=bytes.fromhex("01e132cae527bd21620e822f58514932"),
token=get_token(),
interactivity=Interactivity.INTERACTIVE,
content_type=AUDIO_TRACK,
)