youtube: instrument the extractor with diagnostic logging
Some checks failed
gitleaks / scan (push) Failing after 4s
Some checks failed
gitleaks / scan (push) Failing after 4s
The crate had zero logging — every failure, fallback, cache reset, and empty-parse was silent by construction, which made the 2026 bot-wall outage nearly undiagnosable. Add `log = "0.4"` and 52 statements across the extractor following a one-INFO-per-outcome / WARN-on-every-failure / DEBUG-for-internals policy, so a future break shows up in a log grep instead of a debugger. Highlights: nsig->throttled-URL fallback (aggregated one WARN per extraction, never per-format, via a threaded UrlProcessStats counter); the nsig identity-output trap now returns DeobfError::NsigIdentity and is NOT cached (previously it cached and permanently throttled); player.js build/eval/install/ StillBad lifecycle; the ANDROID->VISIONOS cascade outcome; visitorData decline + reset; HTTP 429 bot-flag; channel/search layout-change empties; per-request DEBUG (query stripped). Plus a `BotDetected` error variant (Display byte- identical to the old string) so the wall is greppable. No secrets: only videoId/channel ids, error Displays (already URL/token-scrubbed at the exceptions.rs choke points), query-stripped endpoints/player.js URLs, counts, and lengths are logged — never token/poToken/visitorData/signature values or response bodies.
This commit is contained in:
parent
dd964407cc
commit
6df61c1f52
14 changed files with 559 additions and 70 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -988,6 +988,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
|||
name = "strawcore-core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"regex",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue