Skip to content

Commit 6fd3b26

Browse files
committed
Remove token fetching logs and silence warnings in MetaAI class
1 parent 6b54283 commit 6fd3b26

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/metaai_api/main.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def _fetch_missing_tokens(self):
6060
Fetch lsd and fb_dtsg tokens if they're missing from cookies.
6161
"""
6262
try:
63-
print("[*] Fetching missing tokens (lsd, fb_dtsg) from Meta AI...")
6463
cookies_str = "; ".join([f"{k}={v}" for k, v in self.cookies.items() if v])
6564

6665
session = HTMLSession()
@@ -71,16 +70,13 @@ def _fetch_missing_tokens(self):
7170
lsd = extract_value(response.text, start_str='"LSD",[],{"token":"', end_str='"')
7271
if lsd:
7372
self.cookies["lsd"] = lsd
74-
print(f"[✓] Fetched lsd: {lsd}")
7573

7674
if "fb_dtsg" not in self.cookies:
7775
fb_dtsg = extract_value(response.text, start_str='DTSGInitData",[],{"token":"', end_str='"')
7876
if fb_dtsg:
7977
self.cookies["fb_dtsg"] = fb_dtsg
80-
print(f"[✓] Fetched fb_dtsg: {fb_dtsg[:50]}...")
8178
except Exception as e:
82-
print(f"[!] Warning: Could not auto-fetch tokens: {e}")
83-
print("[!] Some features may not work without lsd and fb_dtsg")
79+
pass # Silent fail, features may not work without tokens
8480

8581
def get_access_token(self) -> str:
8682
"""

0 commit comments

Comments
 (0)