From d6e0313a5a4f59edad1a99e6c082a0d94165f7c4 Mon Sep 17 00:00:00 2001 From: Parker Date: Fri, 26 Jul 2024 20:45:40 -0500 Subject: [PATCH] Update media api key grabber --- code/utils/media_api_key.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/utils/media_api_key.py b/code/utils/media_api_key.py index b738302..8479010 100644 --- a/code/utils/media_api_key.py +++ b/code/utils/media_api_key.py @@ -18,7 +18,8 @@ def get_media_api_key(): # Look for `const Ga="TOKEN HERE"` for js_file in js_files: response = requests.get(f"{url}/assets/{js_file}") - match = re.search(r"const Ga=\"(.*?)\"", response.text) + # "(?(ey[\w-]+)\.([\w-]+)\.([\w-]+))" - Credit to https://github.com/topi314/LavaSrc + match = re.search(r'"(?Pey[\w-]+\.[\w-]+\.[\w-]+)"', response.text) if match: return match.group(1)