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)