Update media api key grabber
This commit is contained in:
parent
2f088fab5d
commit
d6e0313a5a
@ -18,7 +18,8 @@ def get_media_api_key():
|
|||||||
# Look for `const Ga="TOKEN HERE"`
|
# Look for `const Ga="TOKEN HERE"`
|
||||||
for js_file in js_files:
|
for js_file in js_files:
|
||||||
response = requests.get(f"{url}/assets/{js_file}")
|
response = requests.get(f"{url}/assets/{js_file}")
|
||||||
match = re.search(r"const Ga=\"(.*?)\"", response.text)
|
# "(?<token>(ey[\w-]+)\.([\w-]+)\.([\w-]+))" - Credit to https://github.com/topi314/LavaSrc
|
||||||
|
match = re.search(r'"(?P<token>ey[\w-]+\.[\w-]+\.[\w-]+)"', response.text)
|
||||||
if match:
|
if match:
|
||||||
return match.group(1)
|
return match.group(1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user