Commit graph

4 commits

Author SHA1 Message Date
Ciphercat
f89f4c90ce fix(yahoo): use curl-impersonate for crumb auth (TLS fingerprinting)
Yahoo Finance blocks standard ureq/rustls via TLS fingerprinting (JA3/JA4).
Reverse-engineered from yfinance source: they use curl_cffi with Chrome impersonation.

Fix:
- Fetch cookie via curl-impersonate from fc.yahoo.com
- Fetch crumb via curl-impersonate from query1.finance.yahoo.com/v1/test/getcrumb
  (correct URL: getcrumb, not getCrumb or csrfToken)
- Parse Netscape cookie jar format, send cookies as header to quoteSummary
- 401 retry: clear crumb + cookie jar, re-auth on next attempt
- Crumb validation: reject HTML, empty, rate-limit responses
- Add curl-impersonate-chrome to flake.nix devShell
2026-03-06 07:31:11 +00:00
Ciphercat
a4b8a1b64e dev: remove sqlite from flake (ownership DB moved to idx-api) 2026-03-05 17:26:43 +00:00
Ciphercat
4f46a4d787 dev: add prek to flake.nix devshell 2026-03-05 17:23:43 +00:00
Ciphercat
d457c630c4 dev: add flake.nix and .envrc for Rust dev environment
- rust-overlay for stable toolchain + rust-src + rust-analyzer
- pkg-config, openssl, sqlite for reqwest + ownership DB
- cargo-watch, cargo-nextest for dev workflow
- direnv integration via .envrc
2026-03-05 16:23:49 +00:00