MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / login_from_browser

Function login_from_browser

scratchattach/site/session.py:1493–1500  ·  view source on GitHub ↗

Login from a browser

(browser: Browser = ANY)

Source from the content-addressed store, hash-verified

1491
1492
1493def login_from_browser(browser: Browser = ANY):
1494 """
1495 Login from a browser
1496 """
1497 cookies = cookies_from_browser(browser)
1498 if "scratchsessionsid" in cookies:
1499 return login_by_id(cookies["scratchsessionsid"])
1500 raise ValueError("Not enough data to log in.")

Callers

nothing calls this directly

Calls 2

cookies_from_browserFunction · 0.85
login_by_idFunction · 0.85

Tested by

no test coverage detected