Repository navigation
Zero-relogin local authenticated crawling with Crawl4AI via domain-scoped storage_state (macOS / Linux / Windows Chrome 127+ v20) #2638
wasabihu
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Sharing a lightweight workflow that pairs well with self-hosted / local Crawl4AI when crawling internal docs, dashboards, or SaaS portals you are already signed into in Chrome/Edge.
The friction I kept running into
Crawl4AI's
crwl profiles+ManagedBrowseris great for long-lived identities and strict anti-bot portals, but for quick local authenticated crawls (e.g. Notion, Confluence, internal wikis, private GitHub repos), spinning up a second Chromium window to re-enter passwords / 2FA codes — or copying a multi-GB Chrome profile — felt heavier than needed.Since
BrowserConfig(storage_state=...)already accepts standard PlaywrightstorageStateJSON (cookies+origins[].localStorage), I built an MIT zero-dependency CLI + Companion Extension (sessfork) that projects only the explicitly named domain(s) from your live browser into a0600JSON file without touching or stealing focus from your main Chrome window:Cookies(incl. Chrome 130+v24SHA-256 host-key prefix) + pure-Python LevelDBLocal Storageparser (with MVCC deletion tombstones).v20ABE): No process injection or AV false positives — an auditable ~200-line Manifest V3 Companion Extension syncs only the active tab you click over local Native Messaging to a~816 KiBRust host.Minimal working snippet with Crawl4AI
There is also a full runnable script with
PruningContentFilter(fit_markdown) and JSONL export for local RAG ingestion here:https://github.com/wasabihu/sessfork/blob/main/examples/crawl4ai_auth_crawl.py
Honest boundaries (when to stick with
ManagedBrowser)storage_statecarries cookies +localStorage, not full browser fingerprints or IndexedDB —ManagedBrowser/undetected-browserremains the right tool there.(Side note: while testing
storage_stateacross Crawl4AI'suse_persistent_context=Trueandcdp_urlmodes, I ran into a couple ofTypeErrors inlaunch_persistent_contextandclone_runtime_state, so I also opened #2637 to fix those upstream.)Happy to hear feedback or edge cases from anyone doing local authenticated RAG pipelines with Crawl4AI!
All reactions