You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
get_cookies_from_browser(browser) — extract Fragment session cookies directly from an installed browser (Chrome, Firefox, Edge, Brave, Arc, Opera, Safari, and more); no browser extension or manual copy-paste required
frompyfragment.utilsimportget_cookies_from_browserresult=get_cookies_from_browser("chrome") # or "firefox", "edge", "brave", ...client=FragmentClient(seed="...", api_key="...", cookies=result.cookies)
print(result.expires) # ISO 8601 expiry of stel_ssid, or None for session cookies
CookieResult — return type of get_cookies_from_browser(); exposes .cookies (dict[str, str]) and .expires (ISO 8601 string or None)