diff options
author | Parker <contact@pkrm.dev> | 2024-10-31 05:26:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 05:26:36 +0000 |
commit | 5be16a998857d1f14410904a41d052070d5f8776 (patch) | |
tree | 6b26a4dc377ccf209c37eabf673d6031fdc10987 /code/utils/media_api_key.py | |
parent | c1b229f34c010108b0e7eb92de2102dfc07ae70c (diff) | |
parent | 70e612882d1093b133d13302dccfba6aa2778474 (diff) |
Merge pull request #9 from PacketParker/dev
`black --line-length 79`
Diffstat (limited to 'code/utils/media_api_key.py')
-rw-r--r-- | code/utils/media_api_key.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/code/utils/media_api_key.py b/code/utils/media_api_key.py index 8479010..0184c1f 100644 --- a/code/utils/media_api_key.py +++ b/code/utils/media_api_key.py @@ -19,11 +19,14 @@ def get_media_api_key(): for js_file in js_files: response = requests.get(f"{url}/assets/{js_file}") # "(?<token>(ey[\w-]+)\.([\w-]+)\.([\w-]+))" - Credit to https://github.com/topi314/LavaSrc - match = re.search(r'"(?P<token>ey[\w-]+\.[\w-]+\.[\w-]+)"', response.text) + match = re.search( + r'"(?P<token>ey[\w-]+\.[\w-]+\.[\w-]+)"', response.text + ) if match: return match.group(1) LOG.error( - "Failed to find media API key. Apple Music support will not work until a key is found or manually set." + "Failed to find media API key. Apple Music support will not work until" + " a key is found or manually set." ) return None |