Public report — youtube-dl, published 5 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
613findings with an exact file:lineof 623 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
22/94dimensions across the health lenses142170 LoC — wide & deep
Executive summary
Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.
ytdl-org/youtube-dl carries serious gaps (39%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.
It is strongest in Architecture (100%) — the structure is clean and changes stay contained.
The area that most needs attention is Security (29%) — exposure to security and compliance incidents is elevated. Readiness (36%) is the next concern — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade.
Leadership focus, highest impact first: 9 Leaked secret finding(s) (Secret Scanning); SAST step to CI running what this repository's stack ships (Security & performance tooling); 47 Secret finding(s) (Secrets (history)).
For scale: Large (~142,170 production lines); rebuilding it from scratch would take roughly ~0.9 person-years (~1–2 engineers). Approximate, ±~30%.
It builds on a genuinely strong Architecture foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.7× (at 39% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~0.9 person-years of build effort (about ~€130,000 to rebuild). Its weakest lens is Security at 29% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 9 Leaked secret finding(s) in Secret Scanning — start with shahid.py (2), youtube.py, videa.py.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~0.9 person-years to rebuild), and its weakest lens is Security at 29%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Security first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 9 Leaked secret finding(s) in Secret Scanning — start with shahid.py (2), youtube.py, videa.py. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 9 Leaked secret finding(s) in Secret Scanning — start with shahid.py (2), youtube.py, videa.py.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 4.9/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 8–18% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 4.9/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency matrix
874 modules, 853 dependencies — every dependency points down the layering, so there are no cycles. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
At a glance — Code Health · 60% · Adequate · gated by D1, D2
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A02:2021 — Cryptographic Failures
57
High / Critical
A03:2021 — Injection
47
High / Critical
A04:2021 — Insecure Design
1
Medium
Roadmap
Begin by resolving the nine leaked secrets in the current codebase, specifically targeting shahid.py, youtube.py, and videa.py. Next, integrate a static analysis tool like bandit or semgrep into the CI pipeline to automatically fail the build on security regressions. After that, address the 47 historical secret findings, starting with iqiyi.py, pornhub.py, and gbnews.py. Then, fix the 35 medium-severity static analysis issues in files such as compat.py and utils.py. Finally, establish a structured architecture decision record system to document significant design choices and their consequences.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 9 Leaked secret finding(s) in Secret Scanning — start with shahid.py (2), youtube.py, videa.py.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 20 of 22 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 2 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.5 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 22 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 613 of 623 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 149 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 GenericIE._real_extract (cyclomatic 227) finding(s) in Cyclomatic Complexity — start with generic.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 YoutubeIE._real_extract (cyclomatic 187) finding(s) in Cyclomatic Complexity — start with youtube.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 youtube_dl._real_main (cyclomatic 121) finding(s) in Cyclomatic Complexity — start with __init__.py. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 287 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 YoutubeIE._real_extract (cognitive 382) finding(s) in Cognitive Complexity — start with youtube.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 GenericIE._real_extract (cognitive 287) finding(s) in Cognitive Complexity — start with generic.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 JSInterpreter.interpret_statement (cognitive 226) finding(s) in Cognitive Complexity — start with jsinterp.py. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.4 / 10Exemplary✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 9 Leaked secret finding(s) in Secret Scanning — start with shahid.py (2), youtube.py, videa.py. — One of this dimension's main actionable groups (9 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
youtube-dl's documentation is clear and complete: a single README with an exhaustive installation section plus a dedicated docs/supportedsites.md listing every supported site, and a module_guide.rst covering the Python module interface. The README also contains a full outline of each topic (INSTALLATION; DESCRIPTION; OPTIONS; CONFIGURATION; OUTPUT TEMPLATE; FORMAT SELECTION; VIDEO SELECTION; FAQ; DEVELOPER INSTRUCTIONS; EMBEDDING YOUTUBE-DL; BUGS; COPYRIGHT) and the supported-sites list is fully enumerated in the document. The README's INSTALLATION section covers curl/wget/Windows .exe, pip upgrade, Homebrew/macports, and links to the download page, while the module_guide.rst demonstrates how to use the Python module (extract_info, entries).
The site list is a bare enumeration with no brief description of each site's purpose or what it can extract.docs/supportedsites.md
What to do
Resolve the 1 The site list is a bare enumeration with no brief description of each… finding(s) in Documentation Quality — start with supportedsites.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.
59 finding(s): 0 critical, 59 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
Secret: gcp-api-key · ×47youtube_dl/extractor/youtube.py:3913detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed
What to do
Resolve the 47 Secret finding(s) in Secrets (history) — start with iqiyi.py (5), pornhub.py (3), gbnews.py (2). — One of this dimension's main actionable groups (47 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
High: run-shell-injection · ×11.github/workflows/ci.yml:83detected by semgrep finding
Medium: insecure-file-permissions · ×35devscripts/buildserver.py:251detected by semgrep finding
Low: subprocess-shell-trueyoutube_dl/postprocessor/execafterdownload.py:26detected by semgrep finding
What to do
Resolve the 35 Medium finding(s) in Static Analysis (SAST) — start with compat.py (5), utils.py (5), prosiebensat1.py (4). — One of this dimension's main actionable groups (35 warning-level).
Resolve the 11 High finding(s) in Static Analysis (SAST) — start with ci.yml (9), utils.py, setup.py. — One of this dimension's main actionable groups (11 issue-level).
Resolve the 1 Low finding(s) in Static Analysis (SAST) — start with execafterdownload.py. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D32 · Data Compliance (PII/GDPR)9.0 / 10Exemplary✓ Tool-verified
What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.
Method: Heuristic PII/GDPR pattern scan via semgrep across the repo, using Watchdog's own ruleset (personal data reaching log/console sinks, URLs and query strings, or unprotected browser storage); matches map to severity and a 0-10 wide normalizer. NotApplicable when the scan runs and detects no PII/GDPR surface (no unearned 10); reported LOUDLY as a measurement gap, never as not-applicable, if the ruleset is missing from the analyzer image. Exhaustive, advisory-leaning; degrades on parse failure.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
599 of 610 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is youtube_dl/extractor/generic.py.
Largest orphaned file · ×3youtube_dl/extractor/generic.py
Dormant codebase
What to do
Resolve the 3 Largest orphaned file finding(s) in Knowledge Freshness — start with generic.py, casefold.py, bbc.py. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 No SBOM finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no `NNNN-title.md` documents and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/PlantUML/Mermaid diagram or architecture.md — the high-level shape isn't documented.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
README advertises Docker containerisation, but no Dockerfile/compose file exists
What to do
Reconcile the README with reality: README advertises Docker containerisation, but no Dockerfile/compose file exists.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step.
What to do
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 72 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
AX10 Code composition — not assessed — code composition is computed by ROLE over a document set that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~8157 lines of test source are present (.py) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included
D12 Dependency Hygiene — Dependency hygiene not measured — no supported dependency manifest was read
D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D22 Internal API Consistency — No exposed public API
D23 Boundary Type-Coupling — Production source is present (.py) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D38 OSV Dependency Vulnerabilities — No supported non-.NET dependency lockfile found outside build output (npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven pom.xml, Gradle lockfiles, Python requirements.txt/poetry.lock/Pipfile.lock/pdm.lock, PHP composer.lock, Ruby Gemfile.lock, Elixir mix.lock, Dart pubspec.lock, Swift Package.resolved); nothing for OSV to scan. A NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .py, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.py) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this check looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
GD1 Unfinished & placeholder code — no source files
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
High: run-shell-injection .github/workflows/ci.yml:83— Using variable interpolation `${{...}}` with a workflow input / an `env` value in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input / an `env` value is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
High: github-actions-mutable-action-tag .github/workflows/ci.yml:154— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/ci.yml:161— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: ytdl-org/setup-python@<40-character SHA>`. This step references `ytdl-org/setup-python@v1`; resolve the SHA it points at today with `gh api repos/ytdl-org/setup-python/commits/v1 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/ci.yml:210— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/cache@<40-character SHA>`. This step references `actions/cache@v3`; resolve the SHA it points at today with `gh api repos/actions/cache/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/ci.yml:263— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/cache@<40-character SHA>`. This step references `actions/cache@v3`; resolve the SHA it points at today with `gh api repos/actions/cache/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/ci.yml:318— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v3`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/ci.yml:331— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/cache@<40-character SHA>`. This step references `actions/cache@v3`; resolve the SHA it points at today with `gh api repos/actions/cache/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/ci.yml:473— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/ci.yml:475— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-python@<40-character SHA>`. This step references `actions/setup-python@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-python/commits/v4 --jq .sha`.
High: exec-detected devscripts/utils.py:32— Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
High: exec-detected setup.py:36— Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Leaked secret: gcp-api-key youtube_dl/extractor/youtube.py:452— gcp-api-key detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: high-entropy-secret youtube_dl/extractor/videa.py:94— high-entropy-secret detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: high-entropy-secret youtube_dl/extractor/shahid.py:23— high-entropy-secret detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: aws-access-key youtube_dl/extractor/shahid.py:42— aws-access-key detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: high-entropy-secret youtube_dl/extractor/scrippsnetworks.py:52— high-entropy-secret detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: high-entropy-secret youtube_dl/extractor/canvas.py:262— high-entropy-secret detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: high-entropy-secret youtube_dl/extractor/bitchute.py:104— high-entropy-secret detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: high-entropy-secret youtube_dl/extractor/anvato.py:206— high-entropy-secret detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: jwt youtube_dl/extractor/adultswim.py:159— jwt detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Medium: insecure-file-permissions devscripts/buildserver.py:251— These permissions `0o666` are widely permissive and grant access to more people than may be necessary. A good default is `0o644` which gives read and write access to yourself and read access to everyone else. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: use-defused-xml youtube_dl/compat.py:24— The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: use-defused-xml youtube_dl/compat.py:2730— The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: use-defused-xml youtube_dl/compat.py:2732— The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: use-defused-xml youtube_dl/compat.py:2750— The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: use-defused-xml youtube_dl/compat.py:2752— The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: use-defused-xml youtube_dl/extractor/adobepass.py:6— The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/anvato.py:28— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/bilibili.py:169— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: use-defused-xml youtube_dl/extractor/cbc.py:7— The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/common.py:781— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-sha1 youtube_dl/extractor/crunchyroll.py:299— Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/douyutv.py:98— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/fc2.py:93— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/globo.py:149— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/instagram.py:329— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/iqiyi.py:26— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-sha1 youtube_dl/extractor/jamendo.py:58— Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/kankan.py:8— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/leeco.py:300— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/neteasemusic.py:45— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/neteasemusic.py:74— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 youtube_dl/extractor/nexx.py:358— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-sha1 youtube_dl/extractor/prosiebensat1.py:48— Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-sha1 youtube_dl/extractor/prosiebensat1.py:59— Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
FileTooLong: youtube_dl/utils.py youtube_dl/utils.py:0— FileTooLong — 2977 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extractor/youtube.py youtube_dl/extractor/youtube.py:0— FileTooLong — 2518 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extractor/generic.py youtube_dl/extractor/generic.py:0— FileTooLong — 2515 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extractor/common.py youtube_dl/extractor/common.py:0— FileTooLong — 2329 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: youtube_dl/casefold.py youtube_dl/casefold.py:0— FileTooLong — 1565 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: youtube_dl/YoutubeDL.py youtube_dl/YoutubeDL.py:0— FileTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: youtube_dl/jsinterp.py youtube_dl/jsinterp.py:0— FileTooLong — 974 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: youtube_dl/options.py youtube_dl/options.py:0— FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extractor/bbc.py youtube_dl/extractor/bbc.py:0— FileTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: youtube_dl/swfinterp.py youtube_dl/swfinterp.py:0— FileTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extractor/orf.py youtube_dl/extractor/orf.py:0— FileTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extractor/peertube.py youtube_dl/extractor/peertube.py:0— FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extractor/twitter.py youtube_dl/extractor/twitter.py:0— FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: postprocessor/ffmpeg.py youtube_dl/postprocessor/ffmpeg.py:0— FileTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extractor/npo.py youtube_dl/extractor/npo.py:0— FileTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (12 lines × 2) youtube_dl/YoutubeDL.py:1464— youtube_dl/YoutubeDL.py:1464-1475 | youtube_dl/YoutubeDL.py:1476-1487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/YoutubeDL.py:1464` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) youtube_dl/downloader/dash.py:22— youtube_dl/downloader/dash.py:22-33 | youtube_dl/downloader/ism.py:214-225 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (12 lines × 2) youtube_dl/extractor/common.py:531— youtube_dl/extractor/common.py:531-542 | youtube_dl/extractor/common.py:552-563 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) youtube_dl/extractor/morningstar.py:31— youtube_dl/extractor/morningstar.py:31-42 | youtube_dl/extractor/ruhd.py:23-35 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/morningstar.py:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) youtube_dl/extractor/youtube.py:3819— youtube_dl/extractor/youtube.py:3819-3830 | youtube_dl/extractor/youtube.py:3934-3945 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) youtube_dl/options.py:477— youtube_dl/options.py:477-488 | youtube_dl/options.py:754-765 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:477` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) youtube_dl/utils.py:4867— youtube_dl/utils.py:4867-4888 | youtube_dl/utils.py:4919-4930 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/utils.py:4867` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) youtube_dl/YoutubeDL.py:1244— youtube_dl/YoutubeDL.py:1244-1253 | youtube_dl/utils.py:4905-4914 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (10 lines × 2) youtube_dl/downloader/external.py:452— youtube_dl/downloader/external.py:452-461 | youtube_dl/downloader/rtmp.py:129-138 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) youtube_dl/extractor/ard.py:84— youtube_dl/extractor/ard.py:84-93 | youtube_dl/extractor/tvplay.py:265-274 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (10 lines × 2) youtube_dl/extractor/atresplayer.py:90— youtube_dl/extractor/atresplayer.py:90-99 | youtube_dl/extractor/swrmediathek.py:78-87 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/atresplayer.py:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) youtube_dl/extractor/byutv.py:87— youtube_dl/extractor/byutv.py:87-96 | youtube_dl/extractor/crackle.py:107-116 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) youtube_dl/swfinterp.py:701— youtube_dl/swfinterp.py:701-710 | youtube_dl/swfinterp.py:740-749 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/swfinterp.py:701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
TooManyMethods: InfoExtractor youtube_dl/extractor/common.py:98— TooManyMethods — 124 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: YoutubeDL youtube_dl/YoutubeDL.py:148— TooManyMethods — 67 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FileDownloader youtube_dl/downloader/common.py:21— TooManyMethods — 36 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: YoutubeIE youtube_dl/extractor/youtube.py:685— TooManyMethods — 34 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (12 lines × 3) youtube_dl/options.py:145— youtube_dl/options.py:145-156 | youtube_dl/options.py:746-757 | youtube_dl/options.py:758-769 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) youtube_dl/options.py:185— youtube_dl/options.py:185-196 | youtube_dl/options.py:635-646 | youtube_dl/options.py:660-671 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 3) youtube_dl/options.py:442— youtube_dl/options.py:442-453 | youtube_dl/options.py:615-626 | youtube_dl/options.py:672-683 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:442` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) youtube_dl/options.py:607— youtube_dl/options.py:607-618 | youtube_dl/options.py:639-650 | youtube_dl/options.py:664-675 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:607` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) youtube_dl/downloader/external.py:159— youtube_dl/downloader/external.py:159-166 | youtube_dl/downloader/external.py:208-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) youtube_dl/downloader/external.py:444— youtube_dl/downloader/external.py:444-451 | youtube_dl/downloader/rtmp.py:101-108 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (8 lines × 2) youtube_dl/extractor/metacafe.py:236— youtube_dl/extractor/metacafe.py:236-243 | youtube_dl/extractor/nobelprize.py:38-45 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) youtube_dl/extractor/tudou.py:20— youtube_dl/extractor/tudou.py:20-27 | youtube_dl/extractor/tudou.py:42-49 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/tudou.py:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) youtube_dl/extractor/arkena.py:66— youtube_dl/extractor/arkena.py:66-73 | youtube_dl/extractor/francetv.py:223-229 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (7 lines × 2) youtube_dl/extractor/filmon.py:45— youtube_dl/extractor/filmon.py:45-51 | youtube_dl/extractor/filmon.py:130-136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) youtube_dl/extractor/pbs.py:635— youtube_dl/extractor/pbs.py:635-647 | youtube_dl/extractor/ted.py:261-267 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) youtube_dl/extractor/hornbunny.py:32— youtube_dl/extractor/hornbunny.py:32-47 | youtube_dl/extractor/porn91.py:47-61 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (15 lines × 2) youtube_dl/extractor/scte.py:22— youtube_dl/extractor/scte.py:22-36 | youtube_dl/extractor/udemy.py:176-191 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/scte.py:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) youtube_dl/extractor/limelight.py:167— youtube_dl/extractor/limelight.py:167-182 | youtube_dl/extractor/theweatherchannel.py:76-88 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/limelight.py:167` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) youtube_dl/update.py:109— youtube_dl/update.py:109-121 | youtube_dl/update.py:155-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) youtube_dl/extractor/dplay.py:233— youtube_dl/extractor/dplay.py:233-243 | youtube_dl/extractor/generic.py:3574-3587 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/dplay.py:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) youtube_dl/extractor/generic.py:2968— youtube_dl/extractor/generic.py:2968-2978 | youtube_dl/extractor/generic.py:3113-3131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/generic.py:2968` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) youtube_dl/extractor/redtube.py:90— youtube_dl/extractor/redtube.py:90-99 | youtube_dl/extractor/udemy.py:290-298 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/redtube.py:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) youtube_dl/extractor/youtube.py:302— youtube_dl/extractor/youtube.py:302-310 | youtube_dl/extractor/youtube.py:355-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) youtube_dl/extractor/nbc.py:377— youtube_dl/extractor/nbc.py:377-383 | youtube_dl/extractor/tiktok.py:108-113 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/tiktok.py:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) youtube_dl/extractor/yandexmusic.py:407— youtube_dl/extractor/yandexmusic.py:407-412 | youtube_dl/extractor/yandexmusic.py:436-441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
GenericIE._real_extract (cyclomatic 227) youtube_dl/extractor/generic.py:2529— GenericIE._real_extract has cyclomatic complexity 227 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
YoutubeIE._real_extract (cyclomatic 187) youtube_dl/extractor/youtube.py:2346— YoutubeIE._real_extract has cyclomatic complexity 187 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
youtube_dl._real_main (cyclomatic 121) youtube_dl/__init__.py:49— youtube_dl._real_main has cyclomatic complexity 121 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JSInterpreter.interpret_statement (cyclomatic 121) youtube_dl/jsinterp.py:832— JSInterpreter.interpret_statement has cyclomatic complexity 121 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BBCIE._real_extract (cyclomatic 97) youtube_dl/extractor/bbc.py:897— BBCIE._real_extract has cyclomatic complexity 97 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeDL.process_info (cyclomatic 60) youtube_dl/YoutubeDL.py:1952— YoutubeDL.process_info has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FacebookIE._extract_from_url (cyclomatic 57) youtube_dl/extractor/facebook.py:380— FacebookIE._extract_from_url has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._parse_mpd_formats_and_subtitles (cyclomatic 55) youtube_dl/extractor/common.py:2295— InfoExtractor._parse_mpd_formats_and_subtitles has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NiconicoIE._real_extract (cyclomatic 53) youtube_dl/extractor/niconico.py:381— NiconicoIE._real_extract has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeTabIE._entries (cyclomatic 53) youtube_dl/extractor/youtube.py:3806— YoutubeTabIE._entries has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeDL.process_video_result (cyclomatic 52) youtube_dl/YoutubeDL.py:1645— YoutubeDL.process_video_result has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XHamsterIE._real_extract (cyclomatic 48) youtube_dl/extractor/xhamster.py:131— XHamsterIE._real_extract has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HlsFD.real_download (cyclomatic 43) youtube_dl/downloader/hls.py:60— HlsFD.real_download has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CrunchyrollIE._real_extract (cyclomatic 42) youtube_dl/extractor/crunchyroll.py:414— CrunchyrollIE._real_extract has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JSInterpreter._separate (cyclomatic 42) youtube_dl/jsinterp.py:625— JSInterpreter._separate has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UdemyIE._real_extract (cyclomatic 39) youtube_dl/extractor/udemy.py:214— UdemyIE._real_extract has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DRTVIE._real_extract (cyclomatic 38) youtube_dl/extractor/drtv.py:119— DRTVIE._real_extract has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NRKIE._real_extract (cyclomatic 38) youtube_dl/extractor/nrk.py:146— NRKIE._real_extract has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TEDIE._talk_info (cyclomatic 38) youtube_dl/extractor/ted.py:179— TEDIE._talk_info has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BrightcoveNewIE._parse_brightcove_metadata (cyclomatic 36) youtube_dl/extractor/brightcove.py:471— BrightcoveNewIE._parse_brightcove_metadata has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CeskaTelevizeIE._real_extract (cyclomatic 36) youtube_dl/extractor/ceskatelevize.py:107— CeskaTelevizeIE._real_extract has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VimeoBaseInfoExtractor._parse_config (cyclomatic 36) youtube_dl/extractor/vimeo.py:123— VimeoBaseInfoExtractor._parse_config has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FFmpegFD._call_downloader (cyclomatic 35) youtube_dl/downloader/external.py:373— FFmpegFD._call_downloader has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PuhuTVIE._real_extract (cyclomatic 35) youtube_dl/extractor/puhutv.py:59— PuhuTVIE._real_extract has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoundcloudIE._extract_info_dict (cyclomatic 35) youtube_dl/extractor/soundcloud.py:318— SoundcloudIE._extract_info_dict has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TurnerBaseIE._extract_cvp_info (cyclomatic 35) youtube_dl/extractor/turner.py:53— TurnerBaseIE._extract_cvp_info has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VimeoIE._real_extract (cyclomatic 35) youtube_dl/extractor/vimeo.py:635— VimeoIE._real_extract has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SWFInterpreter.__init__ (cyclomatic 35) youtube_dl/swfinterp.py:186— SWFInterpreter.__init__ has cyclomatic complexity 35 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
KalturaIE._real_extract (cyclomatic 34) youtube_dl/extractor/kaltura.py:229— KalturaIE._real_extract has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NPOIE._get_old_info (cyclomatic 33) youtube_dl/extractor/npo.py:299— NPOIE._get_old_info has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RtmpFD.real_download (cyclomatic 32) youtube_dl/downloader/rtmp.py:24— RtmpFD.real_download has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ADNIE._real_extract (cyclomatic 31) youtube_dl/extractor/adn.py:165— ADNIE._real_extract has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
GoIE._real_extract (cyclomatic 31) youtube_dl/extractor/go.py:158— GoIE._real_extract has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PBSIE._real_extract (cyclomatic 31) youtube_dl/extractor/pbs.py:539— PBSIE._real_extract has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PornHubIE._real_extract (cyclomatic 31) youtube_dl/extractor/pornhub.py:261— PornHubIE._real_extract has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RTSIE._real_extract (cyclomatic 31) youtube_dl/extractor/rts.py:118— RTSIE._real_extract has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSpanIE._real_extract (cyclomatic 30) youtube_dl/extractor/cspan.py:84— CSpanIE._real_extract has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ThreeQSDNIE._real_extract (cyclomatic 30) youtube_dl/extractor/threeqsdn.py:87— ThreeQSDNIE._real_extract has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VKIE._real_extract (cyclomatic 30) youtube_dl/extractor/vk.py:310— VKIE._real_extract has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._parse_smil_formats (cyclomatic 29) youtube_dl/extractor/common.py:2095— InfoExtractor._parse_smil_formats has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FranceTVIE._extract_video (cyclomatic 28) youtube_dl/extractor/francetv.py:89— FranceTVIE._extract_video has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProSiebenSat1BaseIE._extract_video_info (cyclomatic 28) youtube_dl/extractor/prosiebensat1.py:25— ProSiebenSat1BaseIE._extract_video_info has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
update.update_self (cyclomatic 28) youtube_dl/update.py:34— update.update_self has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AdobePassIE._extract_mvpd_auth (cyclomatic 27) youtube_dl/extractor/adobepass.py:1354— AdobePassIE._extract_mvpd_auth has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._parse_f4m_formats (cyclomatic 27) youtube_dl/extractor/common.py:1699— InfoExtractor._parse_f4m_formats has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DailymotionIE._real_extract (cyclomatic 27) youtube_dl/extractor/dailymotion.py:206— DailymotionIE._real_extract has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MetacafeIE._real_extract (cyclomatic 27) youtube_dl/extractor/metacafe.py:131— MetacafeIE._real_extract has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TV2IE._real_extract (cyclomatic 27) youtube_dl/extractor/tv2.py:41— TV2IE._real_extract has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
F4mFD.real_download (cyclomatic 26) youtube_dl/downloader/f4m.py:319— F4mFD.real_download has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._parse_html5_media_entries (cyclomatic 26) youtube_dl/extractor/common.py:2785— InfoExtractor._parse_html5_media_entries has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LimelightBaseIE._extract_info (cyclomatic 26) youtube_dl/extractor/limelight.py:88— LimelightBaseIE._extract_info has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TwitterIE._real_extract (cyclomatic 26) youtube_dl/extractor/twitter.py:432— TwitterIE._real_extract has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArcPublishingIE._real_extract (cyclomatic 25) youtube_dl/extractor/arcpublishing.py:88— ArcPublishingIE._real_extract has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BandcampIE._real_extract (cyclomatic 25) youtube_dl/extractor/bandcamp.py:89— BandcampIE._real_extract has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._json_ld (cyclomatic 25) youtube_dl/extractor/common.py:1355— InfoExtractor._json_ld has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._parse_ism_formats (cyclomatic 25) youtube_dl/extractor/common.py:2690— InfoExtractor._parse_ism_formats has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CrackleIE._real_extract (cyclomatic 25) youtube_dl/extractor/crackle.py:69— CrackleIE._real_extract has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HotStarIE._real_extract (cyclomatic 25) youtube_dl/extractor/hotstar.py:111— HotStarIE._real_extract has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FFmpegExtractAudioPP.run (cyclomatic 25) youtube_dl/postprocessor/ffmpeg.py:265— FFmpegExtractAudioPP.run has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArkenaIE._real_extract (cyclomatic 24) youtube_dl/extractor/arkena.py:65— ArkenaIE._real_extract has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Channel9IE._real_extract (cyclomatic 24) youtube_dl/extractor/channel9.py:99— Channel9IE._real_extract has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DisneyIE._real_extract (cyclomatic 24) youtube_dl/extractor/disney.py:80— DisneyIE._real_extract has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DPlayIE._get_disco_api_info (cyclomatic 24) youtube_dl/extractor/dplay.py:187— DPlayIE._get_disco_api_info has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InstagramIE._real_extract (cyclomatic 24) youtube_dl/extractor/instagram.py:142— InstagramIE._real_extract has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LecturioIE._real_extract (cyclomatic 24) youtube_dl/extractor/lecturio.py:105— LecturioIE._real_extract has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._parse_m3u8_formats (cyclomatic 23) youtube_dl/extractor/common.py:1838— InfoExtractor._parse_m3u8_formats has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InstagramPlaylistIE._extract_graphql (cyclomatic 23) youtube_dl/extractor/instagram.py:292— InstagramPlaylistIE._extract_graphql has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NDREmbedBaseIE._real_extract (cyclomatic 23) youtube_dl/extractor/ndr.py:235— NDREmbedBaseIE._real_extract has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NPOIE._get_info (cyclomatic 23) youtube_dl/extractor/npo.py:186— NPOIE._get_info has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OoyalaBaseIE._extract (cyclomatic 23) youtube_dl/extractor/ooyala.py:26— OoyalaBaseIE._extract has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PluralsightIE._real_extract (cyclomatic 23) youtube_dl/extractor/pluralsight.py:275— PluralsightIE._real_extract has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
URPlayIE._real_extract (cyclomatic 23) youtube_dl/extractor/urplay.py:54— URPlayIE._real_extract has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XTubeIE._real_extract (cyclomatic 23) youtube_dl/extractor/xtube.py:73— XTubeIE._real_extract has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
helper.expect_value (cyclomatic 22) test/helper.py:115— helper.expect_value has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
YoutubeDL._format_note (cyclomatic 22) youtube_dl/YoutubeDL.py:2406— YoutubeDL._format_note has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GoogleDriveIE._real_extract (cyclomatic 22) youtube_dl/extractor/googledrive.py:164— GoogleDriveIE._real_extract has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IviIE._real_extract (cyclomatic 22) youtube_dl/extractor/ivi.py:83— IviIE._real_extract has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MSNIE._real_extract (cyclomatic 22) youtube_dl/extractor/msn.py:69— MSNIE._real_extract has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeBaseInfoExtractor._login (cyclomatic 22) youtube_dl/extractor/youtube.py:211— YoutubeBaseInfoExtractor._login has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HTTPTestRequestHandler.do_GET (cyclomatic 21) test/test_http.py:144— HTTPTestRequestHandler.do_GET has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
YoutubeDL.process_ie_result (cyclomatic 21) youtube_dl/YoutubeDL.py:1001— YoutubeDL.process_ie_result has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArteTVIE._real_extract (cyclomatic 21) youtube_dl/extractor/arte.py:52— ArteTVIE._real_extract has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BBCCoUkIE._process_media_selector (cyclomatic 21) youtube_dl/extractor/bbc.py:364— BBCCoUkIE._process_media_selector has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ITVIE._real_extract (cyclomatic 21) youtube_dl/extractor/itv.py:180— ITVIE._real_extract has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KonserthusetPlayIE._real_extract (cyclomatic 21) youtube_dl/extractor/konserthusetplay.py:31— KonserthusetPlayIE._real_extract has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RaiBaseIE._extract_relinker_info (cyclomatic 21) youtube_dl/extractor/rai.py:36— RaiBaseIE._extract_relinker_info has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RTBFIE._real_extract (cyclomatic 21) youtube_dl/extractor/rtbf.py:70— RTBFIE._real_extract has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XFileShareIE._real_extract (cyclomatic 21) youtube_dl/extractor/xfileshare.py:196— XFileShareIE._real_extract has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YahooIE._extract_yahoo_video (cyclomatic 21) youtube_dl/extractor/yahoo.py:180— YahooIE._extract_yahoo_video has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils.dfxp2srt (cyclomatic 21) youtube_dl/utils.py:4970— utils.dfxp2srt has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BiliBiliIE._real_extract (cyclomatic 20) youtube_dl/extractor/bilibili.py:123— BiliBiliIE._real_extract has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._parse_jwplayer_formats (cyclomatic 20) youtube_dl/extractor/common.py:3111— InfoExtractor._parse_jwplayer_formats has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GloboIE._real_extract (cyclomatic 20) youtube_dl/extractor/globo.py:93— GloboIE._real_extract has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RteBaseIE._real_extract (cyclomatic 20) youtube_dl/extractor/rte.py:20— RteBaseIE._real_extract has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ServusIE._real_extract (cyclomatic 20) youtube_dl/extractor/servus.py:63— ServusIE._real_extract has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ToggleIE._real_extract (cyclomatic 20) youtube_dl/extractor/toggle.py:90— ToggleIE._real_extract has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YandexDiskIE._real_extract (cyclomatic 20) youtube_dl/extractor/yandexdisk.py:59— YandexDiskIE._real_extract has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils.decode_png (cyclomatic 20) youtube_dl/utils.py:6061— utils.decode_png has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeDL.process_subtitles (cyclomatic 19) youtube_dl/YoutubeDL.py:1872— YoutubeDL.process_subtitles has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AfreecaTVIE._real_extract (cyclomatic 19) youtube_dl/extractor/afreecatv.py:223— AfreecaTVIE._real_extract has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AMPIE._extract_feed_info (cyclomatic 19) youtube_dl/extractor/amp.py:18— AMPIE._extract_feed_info has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CCMAIE._real_extract (cyclomatic 19) youtube_dl/extractor/ccma.py:63— CCMAIE._real_extract has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NovaEmbedIE._real_extract (cyclomatic 19) youtube_dl/extractor/nova.py:32— NovaEmbedIE._real_extract has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SixPlayIE._real_extract (cyclomatic 19) youtube_dl/extractor/sixplay.py:43— SixPlayIE._real_extract has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SteamIE._real_extract (cyclomatic 19) youtube_dl/extractor/steam.py:68— SteamIE._real_extract has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VevoIE._real_extract (cyclomatic 19) youtube_dl/extractor/vevo.py:191— VevoIE._real_extract has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ZypeIE._real_extract (cyclomatic 19) youtube_dl/extractor/zype.py:43— ZypeIE._real_extract has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeDL._match_entry (cyclomatic 18) youtube_dl/YoutubeDL.py:793— YoutubeDL._match_entry has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileDownloader.report_progress (cyclomatic 18) youtube_dl/downloader/common.py:259— FileDownloader.report_progress has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CanvasIE._real_extract (cyclomatic 18) youtube_dl/extractor/canvas.py:49— CanvasIE._real_extract has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChaturbateIE._real_extract (cyclomatic 18) youtube_dl/extractor/chaturbate.py:38— ChaturbateIE._real_extract has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FirstTVIE._real_extract (cyclomatic 18) youtube_dl/extractor/firsttv.py:62— FirstTVIE._real_extract has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HBOBaseIE._extract_info (cyclomatic 18) youtube_dl/extractor/hbo.py:56— HBOBaseIE._extract_info has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LEGOIE._real_extract (cyclomatic 18) youtube_dl/extractor/lego.py:66— LEGOIE._real_extract has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MedalTVIE._real_extract (cyclomatic 18) youtube_dl/extractor/medaltv.py:53— MedalTVIE._real_extract has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PeerTubeIE._real_extract (cyclomatic 18) youtube_dl/extractor/peertube.py:531— PeerTubeIE._real_extract has cyclomatic complexity 18 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
SRGSSRIE._real_extract (cyclomatic 18) youtube_dl/extractor/srgssr.py:84— SRGSSRIE._real_extract has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Vbox7IE._real_extract (cyclomatic 18) youtube_dl/extractor/vbox7.py:111— Vbox7IE._real_extract has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VGTVIE._real_extract (cyclomatic 18) youtube_dl/extractor/vgtv.py:167— VGTVIE._real_extract has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LazyList.__getitem__ (cyclomatic 18) youtube_dl/utils.py:4094— LazyList.__getitem__ has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
AdultSwimIE._real_extract (cyclomatic 17) youtube_dl/extractor/adultswim.py:91— AdultSwimIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BrightcoveLegacyIE._real_extract (cyclomatic 17) youtube_dl/extractor/brightcove.py:286— BrightcoveLegacyIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._request_webpage (cyclomatic 17) youtube_dl/extractor/common.py:647— InfoExtractor._request_webpage has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HKETVIE._real_extract (cyclomatic 17) youtube_dl/extractor/hketv.py:74— HKETVIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LinuxAcademyIE._real_extract (cyclomatic 17) youtube_dl/extractor/linuxacademy.py:154— LinuxAcademyIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MixcloudIE._real_extract (cyclomatic 17) youtube_dl/extractor/mixcloud.py:99— MixcloudIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NineGagIE._real_extract (cyclomatic 17) youtube_dl/extractor/ninegag.py:39— NineGagIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OdnoklassnikiIE._real_extract (cyclomatic 17) youtube_dl/extractor/odnoklassniki.py:133— OdnoklassnikiIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OnetBaseIE._extract_from_id (cyclomatic 17) youtube_dl/extractor/onet.py:29— OnetBaseIE._extract_from_id has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RedTubeIE._real_extract (cyclomatic 17) youtube_dl/extractor/redtube.py:45— RedTubeIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SVTBaseIE._extract_video (cyclomatic 17) youtube_dl/extractor/svt.py:22— SVTBaseIE._extract_video has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VideomoreIE._real_extract (cyclomatic 17) youtube_dl/extractor/videomore.py:147— VideomoreIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WatchBoxIE._real_extract (cyclomatic 17) youtube_dl/extractor/watchbox.py:65— WatchBoxIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WDRIE._real_extract (cyclomatic 17) youtube_dl/extractor/wdr.py:44— WDRIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ZattooPlatformBaseIE._extract_formats (cyclomatic 17) youtube_dl/extractor/zattoo.py:124— ZattooPlatformBaseIE._extract_formats has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeDLHandler.http_response (cyclomatic 17) youtube_dl/utils.py:2789— YoutubeDLHandler.http_response has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils.parse_codecs (cyclomatic 17) youtube_dl/utils.py:4742— utils.parse_codecs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeDL.prepare_filename (cyclomatic 16) youtube_dl/YoutubeDL.py:704— YoutubeDL.prepare_filename has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
YoutubeDL.__process_playlist (cyclomatic 16) youtube_dl/YoutubeDL.py:1108— YoutubeDL.__process_playlist has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DashSegmentsFD.real_download (cyclomatic 16) youtube_dl/downloader/dash.py:20— DashSegmentsFD.real_download has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ARDMediathekIE._real_extract (cyclomatic 16) youtube_dl/extractor/ard.py:161— ARDMediathekIE._real_extract has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InfoExtractor._parse_jwplayer_data (cyclomatic 16) youtube_dl/extractor/common.py:3037— InfoExtractor._parse_jwplayer_data has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CondeNastIE._extract_video (cyclomatic 16) youtube_dl/extractor/condenast.py:143— CondeNastIE._extract_video has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunimationIE._real_extract (cyclomatic 16) youtube_dl/extractor/funimation.py:81— FunimationIE._real_extract has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ImgGamingBaseIE._real_extract (cyclomatic 16) youtube_dl/extractor/imggaming.py:64— ImgGamingBaseIE._real_extract has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LyndaIE._real_extract (cyclomatic 16) youtube_dl/extractor/lynda.py:130— LyndaIE._real_extract has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MailRuIE._real_extract (cyclomatic 16) youtube_dl/extractor/mailru.py:99— MailRuIE._real_extract has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MindsIE._real_extract (cyclomatic 16) youtube_dl/extractor/minds.py:71— MindsIE._real_extract has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VidmeIE._real_extract (cyclomatic 16) youtube_dl/extractor/vidme.py:135— VidmeIE._real_extract has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VoxMediaVolumeIE._real_extract (cyclomatic 16) youtube_dl/extractor/voxmedia.py:18— VoxMediaVolumeIE._real_extract has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WistiaBaseIE._extract_media (cyclomatic 16) youtube_dl/extractor/wistia.py:33— WistiaBaseIE._extract_media has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ZingMp3BaseIE._extract_item (cyclomatic 16) youtube_dl/extractor/zingmp3.py:15— ZingMp3BaseIE._extract_item has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JSInterpreter._separate_at_op (cyclomatic 16) youtube_dl/jsinterp.py:710— JSInterpreter._separate_at_op has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EmbedThumbnailPP.run (cyclomatic 16) youtube_dl/postprocessor/embedthumbnail.py:33— EmbedThumbnailPP.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YoutubeIE._real_extract (cognitive 382) youtube_dl/extractor/youtube.py:2346— YoutubeIE._real_extract has cognitive complexity 382 (threshold 15). Drivers by points: if/else 237, loops 58, boolean chains 54, ternaries 30, error handling 3 (nesting depth added 197). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericIE._real_extract (cognitive 287) youtube_dl/extractor/generic.py:2529— GenericIE._real_extract has cognitive complexity 287 (threshold 15). Drivers by points: if/else 247, boolean chains 15, loops 13, ternaries 9, error handling 3 (nesting depth added 64). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
JSInterpreter.interpret_statement (cognitive 226) youtube_dl/jsinterp.py:832— JSInterpreter.interpret_statement has cognitive complexity 226 (threshold 15). Drivers by points: if/else 152, ternaries 28, loops 18, boolean chains 16, error handling 12 (nesting depth added 106). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BBCIE._real_extract (cognitive 207) youtube_dl/extractor/bbc.py:897— BBCIE._real_extract has cognitive complexity 207 (threshold 15). Drivers by points: if/else 127, boolean chains 30, loops 28, ternaries 15, error handling 7 (nesting depth added 109). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
youtube_dl._real_main (cognitive 164) youtube_dl/__init__.py:49— youtube_dl._real_main has cognitive complexity 164 (threshold 15). Drivers by points: if/else 113, boolean chains 29, ternaries 10, loops 9, error handling 3 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeTabIE._entries (cognitive 157) youtube_dl/extractor/youtube.py:3806— YoutubeTabIE._entries has cognitive complexity 157 (threshold 15). Drivers by points: if/else 83, loops 63, boolean chains 5, error handling 3, ternaries 3 (nesting depth added 104). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._parse_mpd_formats_and_subtitles (cognitive 154) youtube_dl/extractor/common.py:2295— InfoExtractor._parse_mpd_formats_and_subtitles has cognitive complexity 154 (threshold 15). Drivers by points: if/else 84, loops 44, ternaries 14, boolean chains 12 (nesting depth added 106). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL.process_info (cognitive 140) youtube_dl/YoutubeDL.py:1952— YoutubeDL.process_info has cognitive complexity 140 (threshold 15). Drivers by points: if/else 94, error handling 28, boolean chains 12, loops 6 (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XHamsterIE._real_extract (cognitive 132) youtube_dl/extractor/xhamster.py:131— XHamsterIE._real_extract has cognitive complexity 132 (threshold 15). Drivers by points: if/else 83, loops 31, boolean chains 9, ternaries 9 (nesting depth added 84). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HlsFD.real_download (cognitive 116) youtube_dl/downloader/hls.py:60— HlsFD.real_download has cognitive complexity 116 (threshold 15). Drivers by points: if/else 91, loops 8, ternaries 8, error handling 5, boolean chains 4 (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FacebookIE._extract_from_url (cognitive 108) youtube_dl/extractor/facebook.py:380— FacebookIE._extract_from_url has cognitive complexity 108 (threshold 15). Drivers by points: if/else 56, loops 31, boolean chains 16, ternaries 5 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CrunchyrollIE._real_extract (cognitive 92) youtube_dl/extractor/crunchyroll.py:414— CrunchyrollIE._real_extract has cognitive complexity 92 (threshold 15). Drivers by points: if/else 75, loops 14, boolean chains 3 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DRTVIE._real_extract (cognitive 90) youtube_dl/extractor/drtv.py:119— DRTVIE._real_extract has cognitive complexity 90 (threshold 15). Drivers by points: if/else 57, loops 15, boolean chains 8, error handling 5, ternaries 5 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL.process_video_result (cognitive 86) youtube_dl/YoutubeDL.py:1645— YoutubeDL.process_video_result has cognitive complexity 86 (threshold 15). Drivers by points: if/else 57, loops 18, boolean chains 8, ternaries 3 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UdemyIE._real_extract (cognitive 84) youtube_dl/extractor/udemy.py:214— UdemyIE._real_extract has cognitive complexity 84 (threshold 15). Drivers by points: if/else 56, loops 11, boolean chains 9, ternaries 7, error handling 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TEDIE._talk_info (cognitive 82) youtube_dl/extractor/ted.py:179— TEDIE._talk_info has cognitive complexity 82 (threshold 15). Drivers by points: if/else 58, loops 16, boolean chains 8 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CeskaTelevizeIE._real_extract (cognitive 77) youtube_dl/extractor/ceskatelevize.py:107— CeskaTelevizeIE._real_extract has cognitive complexity 77 (threshold 15). Drivers by points: if/else 58, loops 12, boolean chains 4, ternaries 3 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._parse_html5_media_entries (cognitive 75) youtube_dl/extractor/common.py:2785— InfoExtractor._parse_html5_media_entries has cognitive complexity 75 (threshold 15). Drivers by points: if/else 47, loops 20, boolean chains 8 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NiconicoIE._real_extract (cognitive 74) youtube_dl/extractor/niconico.py:381— NiconicoIE._real_extract has cognitive complexity 74 (threshold 15). Drivers by points: if/else 27, boolean chains 21, ternaries 19, loops 5, error handling 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSInterpreter._separate (cognitive 72) youtube_dl/jsinterp.py:625— JSInterpreter._separate has cognitive complexity 72 (threshold 15). Drivers by points: if/else 43, boolean chains 16, ternaries 9, loops 4 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PBSIE._real_extract (cognitive 71) youtube_dl/extractor/pbs.py:539— PBSIE._real_extract has cognitive complexity 71 (threshold 15). Drivers by points: if/else 53, loops 13, boolean chains 5 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProSiebenSat1BaseIE._extract_video_info (cognitive 71) youtube_dl/extractor/prosiebensat1.py:25— ProSiebenSat1BaseIE._extract_video_info has cognitive complexity 71 (threshold 15). Drivers by points: if/else 46, ternaries 12, loops 8, boolean chains 5 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdobePassIE._extract_mvpd_auth (cognitive 69) youtube_dl/extractor/adobepass.py:1354— AdobePassIE._extract_mvpd_auth has cognitive complexity 69 (threshold 15). Drivers by points: if/else 63, boolean chains 4, loops 1, ternaries 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BandcampIE._real_extract (cognitive 69) youtube_dl/extractor/bandcamp.py:89— BandcampIE._real_extract has cognitive complexity 69 (threshold 15). Drivers by points: if/else 51, loops 12, boolean chains 5, ternaries 1 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoIE._real_extract (cognitive 69) youtube_dl/extractor/go.py:158— GoIE._real_extract has cognitive complexity 69 (threshold 15). Drivers by points: if/else 43, loops 10, ternaries 9, boolean chains 7 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PornHubIE._real_extract (cognitive 68) youtube_dl/extractor/pornhub.py:261— PornHubIE._real_extract has cognitive complexity 68 (threshold 15). Drivers by points: if/else 52, loops 12, boolean chains 4 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NPOIE._get_old_info (cognitive 65) youtube_dl/extractor/npo.py:299— NPOIE._get_old_info has cognitive complexity 65 (threshold 15). Drivers by points: if/else 48, boolean chains 7, loops 7, error handling 2, ternaries 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VimeoBaseInfoExtractor._parse_config (cognitive 64) youtube_dl/extractor/vimeo.py:123— VimeoBaseInfoExtractor._parse_config has cognitive complexity 64 (threshold 15). Drivers by points: if/else 30, loops 15, boolean chains 12, ternaries 7 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SWFInterpreter.__init__ (cognitive 60) youtube_dl/swfinterp.py:186— SWFInterpreter.__init__ has cognitive complexity 60 (threshold 15). Drivers by points: loops 41, if/else 19 (nesting depth added 26). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TurnerBaseIE._extract_cvp_info (cognitive 59) youtube_dl/extractor/turner.py:53— TurnerBaseIE._extract_cvp_info has cognitive complexity 59 (threshold 15). Drivers by points: if/else 42, boolean chains 8, loops 8, ternaries 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CSpanIE._real_extract (cognitive 58) youtube_dl/extractor/cspan.py:84— CSpanIE._real_extract has cognitive complexity 58 (threshold 15). Drivers by points: if/else 31, ternaries 16, loops 8, boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArcPublishingIE._real_extract (cognitive 57) youtube_dl/extractor/arcpublishing.py:88— ArcPublishingIE._real_extract has cognitive complexity 57 (threshold 15). Drivers by points: if/else 39, loops 9, ternaries 7, boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Channel9IE._real_extract (cognitive 57) youtube_dl/extractor/channel9.py:99— Channel9IE._real_extract has cognitive complexity 57 (threshold 15). Drivers by points: if/else 37, loops 13, ternaries 4, boolean chains 3 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BrightcoveNewIE._parse_brightcove_metadata (cognitive 56) youtube_dl/extractor/brightcove.py:471— BrightcoveNewIE._parse_brightcove_metadata has cognitive complexity 56 (threshold 15). Drivers by points: if/else 30, boolean chains 14, ternaries 9, loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BBCCoUkIE._process_media_selector (cognitive 55) youtube_dl/extractor/bbc.py:364— BBCCoUkIE._process_media_selector has cognitive complexity 55 (threshold 15). Drivers by points: if/else 38, loops 9, error handling 5, boolean chains 3 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KalturaIE._real_extract (cognitive 55) youtube_dl/extractor/kaltura.py:229— KalturaIE._real_extract has cognitive complexity 55 (threshold 15). Drivers by points: if/else 39, boolean chains 7, error handling 3, loops 3, ternaries 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LimelightBaseIE._extract_info (cognitive 55) youtube_dl/extractor/limelight.py:88— LimelightBaseIE._extract_info has cognitive complexity 55 (threshold 15). Drivers by points: if/else 37, loops 10, boolean chains 8 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CrackleIE._real_extract (cognitive 54) youtube_dl/extractor/crackle.py:69— CrackleIE._real_extract has cognitive complexity 54 (threshold 15). Drivers by points: if/else 38, loops 9, boolean chains 4, error handling 2, ternaries 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NRKIE._real_extract (cognitive 54) youtube_dl/extractor/nrk.py:146— NRKIE._real_extract has cognitive complexity 54 (threshold 15). Drivers by points: if/else 37, boolean chains 11, loops 3, ternaries 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoundcloudIE._extract_info_dict (cognitive 54) youtube_dl/extractor/soundcloud.py:318— SoundcloudIE._extract_info_dict has cognitive complexity 54 (threshold 15). Drivers by points: if/else 34, boolean chains 13, loops 5, ternaries 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SteamIE._real_extract (cognitive 54) youtube_dl/extractor/steam.py:68— SteamIE._real_extract has cognitive complexity 54 (threshold 15). Drivers by points: if/else 38, loops 15, boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FFmpegFD._call_downloader (cognitive 53) youtube_dl/downloader/external.py:373— FFmpegFD._call_downloader has cognitive complexity 53 (threshold 15). Drivers by points: if/else 40, boolean chains 6, loops 4, ternaries 2, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RTSIE._real_extract (cognitive 53) youtube_dl/extractor/rts.py:118— RTSIE._real_extract has cognitive complexity 53 (threshold 15). Drivers by points: if/else 33, boolean chains 9, ternaries 7, loops 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._parse_ism_formats (cognitive 52) youtube_dl/extractor/common.py:2690— InfoExtractor._parse_ism_formats has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16, ternaries 12, loops 10, boolean chains 9, error handling 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluralsightIE._real_extract (cognitive 51) youtube_dl/extractor/pluralsight.py:275— PluralsightIE._real_extract has cognitive complexity 51 (threshold 15). Drivers by points: if/else 29, loops 12, ternaries 5, error handling 3, boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThreeQSDNIE._real_extract (cognitive 51) youtube_dl/extractor/threeqsdn.py:87— ThreeQSDNIE._real_extract has cognitive complexity 51 (threshold 15). Drivers by points: if/else 27, boolean chains 9, ternaries 8, loops 6, error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetacafeIE._real_extract (cognitive 50) youtube_dl/extractor/metacafe.py:131— MetacafeIE._real_extract has cognitive complexity 50 (threshold 15). Drivers by points: if/else 41, loops 6, boolean chains 2, ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
F4mFD.real_download (cognitive 48) youtube_dl/downloader/f4m.py:319— F4mFD.real_download has cognitive complexity 48 (threshold 15). Drivers by points: if/else 34, boolean chains 6, error handling 5, loops 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._parse_m3u8_formats (cognitive 48) youtube_dl/extractor/common.py:1838— InfoExtractor._parse_m3u8_formats has cognitive complexity 48 (threshold 15). Drivers by points: if/else 34, ternaries 8, boolean chains 4, loops 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NovaEmbedIE._real_extract (cognitive 48) youtube_dl/extractor/nova.py:32— NovaEmbedIE._real_extract has cognitive complexity 48 (threshold 15). Drivers by points: if/else 30, loops 14, boolean chains 4 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TV2IE._real_extract (cognitive 47) youtube_dl/extractor/tv2.py:41— TV2IE._real_extract has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29, boolean chains 7, ternaries 6, loops 3, error handling 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwitterIE._real_extract (cognitive 47) youtube_dl/extractor/twitter.py:432— TwitterIE._real_extract has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20, ternaries 15, boolean chains 7, loops 5 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ADNIE._real_extract (cognitive 46) youtube_dl/extractor/adn.py:165— ADNIE._real_extract has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 18, if/else 18, loops 8, error handling 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._parse_f4m_formats (cognitive 46) youtube_dl/extractor/common.py:1699— InfoExtractor._parse_f4m_formats has cognitive complexity 46 (threshold 15). Drivers by points: if/else 25, ternaries 12, boolean chains 8, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
update.update_self (cognitive 46) youtube_dl/update.py:34— update.update_self has cognitive complexity 46 (threshold 15). Drivers by points: if/else 32, error handling 12, boolean chains 1, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InstagramPlaylistIE._extract_graphql (cognitive 45) youtube_dl/extractor/instagram.py:292— InstagramPlaylistIE._extract_graphql has cognitive complexity 45 (threshold 15). Drivers by points: if/else 29, boolean chains 8, loops 5, error handling 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PuhuTVIE._real_extract (cognitive 45) youtube_dl/extractor/puhutv.py:59— PuhuTVIE._real_extract has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24, boolean chains 16, loops 4, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArkenaIE._real_extract (cognitive 44) youtube_dl/extractor/arkena.py:65— ArkenaIE._real_extract has cognitive complexity 44 (threshold 15). Drivers by points: if/else 33, loops 6, boolean chains 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._json_ld (cognitive 44) youtube_dl/extractor/common.py:1355— InfoExtractor._json_ld has cognitive complexity 44 (threshold 15). Drivers by points: if/else 37, boolean chains 6, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FFmpegExtractAudioPP.run (cognitive 44) youtube_dl/postprocessor/ffmpeg.py:265— FFmpegExtractAudioPP.run has cognitive complexity 44 (threshold 15). Drivers by points: if/else 36, boolean chains 6, error handling 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ARDMediathekBaseIE._extract_formats (cognitive 43) youtube_dl/extractor/ard.py:65— ARDMediathekBaseIE._extract_formats has cognitive complexity 43 (threshold 15). Drivers by points: if/else 35, loops 6, boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InstagramIE._real_extract (cognitive 43) youtube_dl/extractor/instagram.py:142— InstagramIE._real_extract has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28, boolean chains 7, loops 4, ternaries 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VimeoIE._real_extract (cognitive 43) youtube_dl/extractor/vimeo.py:635— VimeoIE._real_extract has cognitive complexity 43 (threshold 15). Drivers by points: if/else 33, boolean chains 9, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._parse_smil_formats (cognitive 42) youtube_dl/extractor/common.py:2095— InfoExtractor._parse_smil_formats has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17, ternaries 12, boolean chains 11, loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NPOIE._get_info (cognitive 42) youtube_dl/extractor/npo.py:186— NPOIE._get_info has cognitive complexity 42 (threshold 15). Drivers by points: if/else 30, boolean chains 6, loops 6 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.dfxp2srt (cognitive 42) youtube_dl/utils.py:4970— utils.dfxp2srt has cognitive complexity 42 (threshold 15). Drivers by points: if/else 29, loops 11, boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DailymotionIE._real_extract (cognitive 41) youtube_dl/extractor/dailymotion.py:206— DailymotionIE._real_extract has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19, boolean chains 9, ternaries 7, loops 6 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoogleDriveIE._real_extract (cognitive 41) youtube_dl/extractor/googledrive.py:164— GoogleDriveIE._real_extract has cognitive complexity 41 (threshold 15). Drivers by points: if/else 30, boolean chains 7, loops 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MSNIE._real_extract (cognitive 41) youtube_dl/extractor/msn.py:69— MSNIE._real_extract has cognitive complexity 41 (threshold 15). Drivers by points: if/else 30, loops 5, ternaries 4, boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YouNowChannelIE._entries (cognitive 41) youtube_dl/extractor/younow.py:131— YouNowChannelIE._entries has cognitive complexity 41 (threshold 15). Drivers by points: if/else 31, loops 8, boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BrightcoveLegacyIE._real_extract (cognitive 40) youtube_dl/extractor/brightcove.py:286— BrightcoveLegacyIE._real_extract has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DPlayIE._get_disco_api_info (cognitive 39) youtube_dl/extractor/dplay.py:187— DPlayIE._get_disco_api_info has cognitive complexity 39 (threshold 15). Drivers by points: if/else 29, boolean chains 5, loops 3, error handling 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VKIE._real_extract (cognitive 39) youtube_dl/extractor/vk.py:310— VKIE._real_extract has cognitive complexity 39 (threshold 15). Drivers by points: if/else 29, boolean chains 7, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeBaseInfoExtractor._login (cognitive 39) youtube_dl/extractor/youtube.py:211— YoutubeBaseInfoExtractor._login has cognitive complexity 39 (threshold 15). Drivers by points: if/else 32, ternaries 6, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DisneyIE._real_extract (cognitive 38) youtube_dl/extractor/disney.py:80— DisneyIE._real_extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23, boolean chains 7, loops 6, ternaries 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HBOBaseIE._extract_info (cognitive 38) youtube_dl/extractor/hbo.py:56— HBOBaseIE._extract_info has cognitive complexity 38 (threshold 15). Drivers by points: if/else 27, loops 7, ternaries 3, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RteBaseIE._real_extract (cognitive 38) youtube_dl/extractor/rte.py:20— RteBaseIE._real_extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 30, boolean chains 5, error handling 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XTubeIE._real_extract (cognitive 38) youtube_dl/extractor/xtube.py:73— XTubeIE._real_extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 26, boolean chains 4, loops 4, ternaries 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZypeIE._real_extract (cognitive 38) youtube_dl/extractor/zype.py:43— ZypeIE._real_extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 29, loops 5, boolean chains 3, error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SixPlayIE._real_extract (cognitive 37) youtube_dl/extractor/sixplay.py:43— SixPlayIE._real_extract has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24, boolean chains 8, loops 5 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashSegmentsFD.real_download (cognitive 36) youtube_dl/downloader/dash.py:20— DashSegmentsFD.real_download has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22, error handling 6, ternaries 4, loops 3, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RtmpFD.real_download (cognitive 36) youtube_dl/downloader/rtmp.py:24— RtmpFD.real_download has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, boolean chains 7, loops 3, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BiliBiliIE._real_extract (cognitive 36) youtube_dl/extractor/bilibili.py:123— BiliBiliIE._real_extract has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17, loops 12, ternaries 4, boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LecturioIE._real_extract (cognitive 36) youtube_dl/extractor/lecturio.py:105— LecturioIE._real_extract has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21, boolean chains 8, ternaries 5, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AfreecaTVIE._real_extract (cognitive 35) youtube_dl/extractor/afreecatv.py:223— AfreecaTVIE._real_extract has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22, ternaries 8, loops 3, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FranceTVIE._extract_video (cognitive 35) youtube_dl/extractor/francetv.py:89— FranceTVIE._extract_video has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, boolean chains 5, loops 4, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YouPornListBase._entries (cognitive 34) youtube_dl/extractor/youporn.py:280— YouPornListBase._entries has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, loops 6, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KonserthusetPlayIE._real_extract (cognitive 33) youtube_dl/extractor/konserthusetplay.py:31— KonserthusetPlayIE._real_extract has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15, boolean chains 7, ternaries 7, loops 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TVNowShowIE._real_extract (cognitive 33) youtube_dl/extractor/tvnow.py:444— TVNowShowIE._real_extract has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, loops 7, boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArteTVIE._real_extract (cognitive 32) youtube_dl/extractor/arte.py:52— ArteTVIE._real_extract has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17, boolean chains 7, loops 6, ternaries 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._parse_jwplayer_formats (cognitive 32) youtube_dl/extractor/common.py:3111— InfoExtractor._parse_jwplayer_formats has cognitive complexity 32 (threshold 15). Drivers by points: if/else 24, boolean chains 7, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NDREmbedBaseIE._real_extract (cognitive 32) youtube_dl/extractor/ndr.py:235— NDREmbedBaseIE._real_extract has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18, boolean chains 8, loops 4, ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NprIE._real_extract (cognitive 32) youtube_dl/extractor/npr.py:58— NprIE._real_extract has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26, loops 5, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OnetBaseIE._extract_from_id (cognitive 32) youtube_dl/extractor/onet.py:29— OnetBaseIE._extract_from_id has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21, loops 6, boolean chains 3, ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XFileShareIE._real_extract (cognitive 32) youtube_dl/extractor/xfileshare.py:196— XFileShareIE._real_extract has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16, loops 10, boolean chains 5, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FragmentFD._prepare_frag_download (cognitive 31) youtube_dl/downloader/fragment.py:133— FragmentFD._prepare_frag_download has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, boolean chains 4, ternaries 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChaturbateIE._real_extract (cognitive 31) youtube_dl/extractor/chaturbate.py:38— ChaturbateIE._real_extract has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19, loops 10, ternaries 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HotStarIE._real_extract (cognitive 31) youtube_dl/extractor/hotstar.py:111— HotStarIE._real_extract has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17, boolean chains 8, loops 3, error handling 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NineGagIE._real_extract (cognitive 31) youtube_dl/extractor/ninegag.py:39— NineGagIE._real_extract has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19, loops 6, ternaries 5, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RaiBaseIE._extract_relinker_info (cognitive 31) youtube_dl/extractor/rai.py:36— RaiBaseIE._extract_relinker_info has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18, boolean chains 6, ternaries 6, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
URPlayIE._real_extract (cognitive 31) youtube_dl/extractor/urplay.py:54— URPlayIE._real_extract has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18, boolean chains 9, loops 3, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YahooIE._extract_yahoo_video (cognitive 31) youtube_dl/extractor/yahoo.py:180— YahooIE._extract_yahoo_video has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14, boolean chains 6, loops 6, ternaries 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZattooPlatformBaseIE._extract_formats (cognitive 31) youtube_dl/extractor/zattoo.py:124— ZattooPlatformBaseIE._extract_formats has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, loops 6, ternaries 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSInterpreter._separate_at_op (cognitive 31) youtube_dl/jsinterp.py:710— JSInterpreter._separate_at_op has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15, loops 8, ternaries 5, boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdultSwimIE._real_extract (cognitive 30) youtube_dl/extractor/adultswim.py:91— AdultSwimIE._real_extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 5, boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GediDigitalIE._real_extract (cognitive 30) youtube_dl/extractor/gedidigital.py:97— GediDigitalIE._real_extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 28, boolean chains 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LyndaIE._real_extract (cognitive 30) youtube_dl/extractor/lynda.py:130— LyndaIE._real_extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16, loops 7, ternaries 6, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TvigleIE._real_extract (cognitive 30) youtube_dl/extractor/tvigle.py:56— TvigleIE._real_extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, loops 4, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.decode_png (cognitive 30) youtube_dl/utils.py:6061— utils.decode_png has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 5, boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL._match_entry (cognitive 29) youtube_dl/YoutubeDL.py:793— YoutubeDL._match_entry has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CCMAIE._real_extract (cognitive 29) youtube_dl/extractor/ccma.py:63— CCMAIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, boolean chains 4, loops 3, ternaries 3, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._initialize_geo_bypass (cognitive 29) youtube_dl/extractor/common.py:480— InfoExtractor._initialize_geo_bypass has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FirstTVIE._real_extract (cognitive 29) youtube_dl/extractor/firsttv.py:62— FirstTVIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, boolean chains 8, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImgGamingBaseIE._real_extract (cognitive 29) youtube_dl/extractor/imggaming.py:64— ImgGamingBaseIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17, loops 7, ternaries 3, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IviIE._real_extract (cognitive 29) youtube_dl/extractor/ivi.py:83— IviIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, boolean chains 4, error handling 3, loops 2, ternaries 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SohuIE._real_extract (cognitive 29) youtube_dl/extractor/sohu.py:87— SohuIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20, loops 7, ternaries 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToggleIE._real_extract (cognitive 29) youtube_dl/extractor/toggle.py:90— ToggleIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, loops 7, boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.write_xattr (cognitive 29) youtube_dl/utils.py:6166— utils.write_xattr has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, error handling 9, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL.process_ie_result (cognitive 28) youtube_dl/YoutubeDL.py:1001— YoutubeDL.process_ie_result has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 4, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AMPIE._extract_feed_info (cognitive 28) youtube_dl/extractor/amp.py:18— AMPIE._extract_feed_info has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._request_webpage (cognitive 28) youtube_dl/extractor/common.py:647— InfoExtractor._request_webpage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LEGOIE._real_extract (cognitive 28) youtube_dl/extractor/lego.py:66— LEGOIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17, boolean chains 6, loops 4, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LinuxAcademyIE._real_extract (cognitive 28) youtube_dl/extractor/linuxacademy.py:154— LinuxAcademyIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15, boolean chains 6, ternaries 5, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MDRIE._real_extract (cognitive 28) youtube_dl/extractor/mdr.py:102— MDRIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 3, loops 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RTBFIE._real_extract (cognitive 28) youtube_dl/extractor/rtbf.py:70— RTBFIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16, boolean chains 6, loops 5, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SRGSSRIE._real_extract (cognitive 28) youtube_dl/extractor/srgssr.py:84— SRGSSRIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, loops 7, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamcocoIE._real_extract (cognitive 28) youtube_dl/extractor/teamcoco.py:110— TeamcocoIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, loops 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WDRIE._real_extract (cognitive 28) youtube_dl/extractor/wdr.py:44— WDRIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 5, boolean chains 1, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WistiaBaseIE._extract_media (cognitive 28) youtube_dl/extractor/wistia.py:33— WistiaBaseIE._extract_media has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, boolean chains 5, ternaries 3, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ARDMediathekIE._real_extract (cognitive 27) youtube_dl/extractor/ard.py:161— ARDMediathekIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, ternaries 5, loops 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CuriosityStreamIE._real_extract (cognitive 27) youtube_dl/extractor/curiositystream.py:68— CuriosityStreamIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, loops 7, boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HitboxLiveIE._real_extract (cognitive 27) youtube_dl/extractor/hitbox.py:160— HitboxLiveIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, loops 4, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PBSIE._extract_webpage (cognitive 27) youtube_dl/extractor/pbs.py:438— PBSIE._extract_webpage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, loops 4, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpankwireIE._real_extract (cognitive 27) youtube_dl/extractor/spankwire.py:76— SpankwireIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, loops 3, ternaries 3, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwitchPlaylistBaseIE._entries (cognitive 27) youtube_dl/extractor/twitch.py:428— TwitchPlaylistBaseIE._entries has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, loops 3, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VevoIE._real_extract (cognitive 27) youtube_dl/extractor/vevo.py:191— VevoIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, boolean chains 2, loops 2, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VRVIE._real_extract (cognitive 27) youtube_dl/extractor/vrv.py:167— VRVIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15, loops 11, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZingMp3BaseIE._extract_item (cognitive 27) youtube_dl/extractor/zingmp3.py:15— ZingMp3BaseIE._extract_item has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, boolean chains 4, loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils._match_one (cognitive 27) youtube_dl/utils.py:4866— utils._match_one has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, boolean chains 3, error handling 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL.__process_playlist (cognitive 26) youtube_dl/YoutubeDL.py:1108— YoutubeDL.__process_playlist has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 4, ternaries 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL.process_subtitles (cognitive 26) youtube_dl/YoutubeDL.py:1872— YoutubeDL.process_subtitles has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, loops 5, boolean chains 4, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PeerTubeIE._real_extract (cognitive 26) youtube_dl/extractor/peertube.py:531— PeerTubeIE._real_extract has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 5, ternaries 3, loops 2 (nesting depth added 7). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
PinterestBaseIE._extract_video (cognitive 26) youtube_dl/extractor/pinterest.py:29— PinterestBaseIE._extract_video has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, boolean chains 4, loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YandexDiskIE._real_extract (cognitive 26) youtube_dl/extractor/yandexdisk.py:59— YandexDiskIE._real_extract has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, boolean chains 10, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDLHandler.http_response (cognitive 26) youtube_dl/utils.py:2789— YoutubeDLHandler.http_response has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 3, boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDLCookieJar.save (cognitive 26) youtube_dl/utils.py:2951— YoutubeDLCookieJar.save has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.parse_codecs (cognitive 26) youtube_dl/utils.py:4742— utils.parse_codecs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, boolean chains 4, ternaries 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileDownloader.report_progress (cognitive 25) youtube_dl/downloader/common.py:259— FileDownloader.report_progress has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._parse_jwplayer_data (cognitive 25) youtube_dl/extractor/common.py:3037— InfoExtractor._parse_jwplayer_data has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, boolean chains 4, loops 3, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CoubIE._real_extract (cognitive 25) youtube_dl/extractor/coub.py:46— CoubIE._real_extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, ternaries 5, loops 3, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GloboIE._real_extract (cognitive 25) youtube_dl/extractor/globo.py:93— GloboIE._real_extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, boolean chains 7, ternaries 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediasiteIE._real_extract (cognitive 25) youtube_dl/extractor/mediasite.py:125— MediasiteIE._real_extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, loops 6, ternaries 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RedTubeIE._real_extract (cognitive 25) youtube_dl/extractor/redtube.py:45— RedTubeIE._real_extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, boolean chains 5, loops 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SVTBaseIE._extract_video (cognitive 25) youtube_dl/extractor/svt.py:22— SVTBaseIE._extract_video has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 3, ternaries 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL.trouble (cognitive 24) youtube_dl/YoutubeDL.py:610— YoutubeDL.trouble has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, ternaries 3, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL._calc_headers (cognitive 24) youtube_dl/YoutubeDL.py:1578— YoutubeDL._calc_headers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12, loops 5, ternaries 5, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IsmFD.real_download (cognitive 24) youtube_dl/downloader/ism.py:213— IsmFD.real_download has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, error handling 3, loops 3, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppleTrailersIE._real_extract (cognitive 24) youtube_dl/extractor/appletrailers.py:96— AppleTrailersIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: loops 12, if/else 10, boolean chains 2 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CamModelsIE._real_extract (cognitive 24) youtube_dl/extractor/cammodels.py:19— CamModelsIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DVTVIE._parse_video_metadata (cognitive 24) youtube_dl/extractor/dvtv.py:115— DVTVIE._parse_video_metadata has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13, loops 7, boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HKETVIE._real_extract (cognitive 24) youtube_dl/extractor/hketv.py:74— HKETVIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14, boolean chains 6, loops 2, ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ITVIE._real_extract (cognitive 24) youtube_dl/extractor/itv.py:180— ITVIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10, boolean chains 9, loops 3, ternaries 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KinjaEmbedIE._real_extract (cognitive 24) youtube_dl/extractor/kinja.py:131— KinjaEmbedIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 4, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MTVServicesInfoExtractor._extract_video_formats (cognitive 24) youtube_dl/extractor/mtv.py:71— MTVServicesInfoExtractor._extract_video_formats has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13, ternaries 6, error handling 3, boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NexxIE._extract_azure_formats (cognitive 24) youtube_dl/extractor/nexx.py:223— NexxIE._extract_azure_formats has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 3, boolean chains 1, ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NRKTVSeriesIE._real_extract (cognitive 24) youtube_dl/extractor/nrk.py:693— NRKTVSeriesIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12, boolean chains 6, loops 4, ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VGTVIE._real_extract (cognitive 24) youtube_dl/extractor/vgtv.py:167— VGTVIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14, loops 4, ternaries 4, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EmbedThumbnailPP.run (cognitive 24) youtube_dl/postprocessor/embedthumbnail.py:33— EmbedThumbnailPP.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FFmpegPostProcessor._determine_executables (cognitive 24) youtube_dl/postprocessor/ffmpeg.py:76— FFmpegPostProcessor._determine_executables has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, loops 3, ternaries 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._extract_akamai_formats (cognitive 23) youtube_dl/extractor/common.py:2911— InfoExtractor._extract_akamai_formats has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, loops 9, ternaries 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CorusIE._real_extract (cognitive 23) youtube_dl/extractor/corus.py:98— CorusIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, ternaries 4, boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FusionIE._real_extract (cognitive 23) youtube_dl/extractor/fusion.py:38— FusionIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9, ternaries 8, boolean chains 3, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MedalTVIE._real_extract (cognitive 23) youtube_dl/extractor/medaltv.py:53— MedalTVIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, boolean chains 6, ternaries 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OoyalaBaseIE._extract (cognitive 23) youtube_dl/extractor/ooyala.py:26— OoyalaBaseIE._extract has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 10, loops 2 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ServusIE._real_extract (cognitive 23) youtube_dl/extractor/servus.py:63— ServusIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 9, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamTreeHouseIE._real_extract (cognitive 23) youtube_dl/extractor/teamtreehouse.py:73— TeamTreeHouseIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, loops 9 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TVNowBaseIE._extract_video (cognitive 23) youtube_dl/extractor/tvnow.py:30— TVNowBaseIE._extract_video has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, loops 7, boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UMGDeIE._real_extract (cognitive 23) youtube_dl/extractor/umg.py:28— UMGDeIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 3, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VideomoreIE._real_extract (cognitive 23) youtube_dl/extractor/videomore.py:147— VideomoreIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 4, boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeTabIE._grid_entries (cognitive 23) youtube_dl/extractor/youtube.py:3560— YoutubeTabIE._grid_entries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prepare_manpage.filter_options (cognitive 22) devscripts/prepare_manpage.py:43— prepare_manpage.filter_options has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL.__init__ (cognitive 22) youtube_dl/YoutubeDL.py:378— YoutubeDL.__init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, error handling 4, loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL._format_note (cognitive 22) youtube_dl/YoutubeDL.py:2406— YoutubeDL._format_note has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9, boolean chains 8, ternaries 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CanvasIE._real_extract (cognitive 22) youtube_dl/extractor/canvas.py:49— CanvasIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiscoveryGoBaseIE._extract_video_info (cognitive 22) youtube_dl/extractor/discoverygo.py:31— DiscoveryGoBaseIE._extract_video_info has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, ternaries 5, loops 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediasetIE._real_extract (cognitive 22) youtube_dl/extractor/mediaset.py:134— MediasetIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: loops 7, if/else 6, ternaries 4, error handling 3, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MicrosoftVirtualAcademyIE._real_extract (cognitive 22) youtube_dl/extractor/microsoftvirtualacademy.py:55— MicrosoftVirtualAcademyIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 4, boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NHLBaseIE._real_extract (cognitive 22) youtube_dl/extractor/nhl.py:16— NHLBaseIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, ternaries 4, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PornHubPagedPlaylistBaseIE._entries (cognitive 22) youtube_dl/extractor/pornhub.py:584— PornHubPagedPlaylistBaseIE._entries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, error handling 4, loops 3, boolean chains 2, ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TelecincoIE._real_extract (cognitive 22) youtube_dl/extractor/telecinco.py:118— TelecincoIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, boolean chains 3, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TVPlayIE._real_extract (cognitive 22) youtube_dl/extractor/tvplay.py:236— TVPlayIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 2, error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UdemyCourseIE._real_extract (cognitive 22) youtube_dl/extractor/udemy.py:437— UdemyCourseIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UOLIE._real_extract (cognitive 22) youtube_dl/extractor/uol.py:67— UOLIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, loops 8, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
options.parseOpts (cognitive 22) youtube_dl/options.py:42— options.parseOpts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 3, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TestUnicodeLiterals.test_all_files (cognitive 21) test/test_unicode_literals.py:32— TestUnicodeLiterals.test_all_files has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 5, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BrightcoveNewIE._real_extract (cognitive 21) youtube_dl/extractor/brightcove.py:589— BrightcoveNewIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, boolean chains 4, error handling 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CondeNastIE._extract_video (cognitive 21) youtube_dl/extractor/condenast.py:143— CondeNastIE._extract_video has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, ternaries 4, boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DailymotionBaseInfoExtractor._call_api (cognitive 21) youtube_dl/extractor/dailymotion.py:48— DailymotionBaseInfoExtractor._call_api has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, ternaries 4, error handling 3, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MailRuIE._real_extract (cognitive 21) youtube_dl/extractor/mailru.py:99— MailRuIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, boolean chains 5, ternaries 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NBABaseIE._extract_video (cognitive 21) youtube_dl/extractor/nba.py:277— NBABaseIE._extract_video has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OdnoklassnikiIE._real_extract (cognitive 21) youtube_dl/extractor/odnoklassniki.py:133— OdnoklassnikiIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, ternaries 3, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PlayvidIE._real_extract (cognitive 21) youtube_dl/extractor/playvid.py:41— PlayvidIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, error handling 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RICEIE._real_extract (cognitive 21) youtube_dl/extractor/rice.py:32— RICEIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RTVEALaCartaIE._decrypt_url (cognitive 21) youtube_dl/extractor/rtve.py:80— RTVEALaCartaIE._decrypt_url has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 7 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RUTVIE._real_extract (cognitive 21) youtube_dl/extractor/rutv.py:126— RUTVIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, ternaries 5, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SevenPlusIE._real_extract (cognitive 21) youtube_dl/extractor/sevenplus.py:45— SevenPlusIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 5, boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SVTSeriesIE._real_extract (cognitive 21) youtube_dl/extractor/svt.py:303— SVTSeriesIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 5, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VidmeIE._real_extract (cognitive 21) youtube_dl/extractor/vidme.py:135— VidmeIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, ternaries 4, boolean chains 3, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VoxMediaVolumeIE._real_extract (cognitive 21) youtube_dl/extractor/voxmedia.py:18— VoxMediaVolumeIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 7, ternaries 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OnDemandPagedList.getslice (cognitive 21) youtube_dl/utils.py:4162— OnDemandPagedList.getslice has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, ternaries 4, boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CONtvIE._real_extract (cognitive 20) youtube_dl/extractor/contv.py:36— CONtvIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, loops 8, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HiDiveIE._real_extract (cognitive 20) youtube_dl/extractor/hidive.py:57— HiDiveIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MindsIE._real_extract (cognitive 20) youtube_dl/extractor/minds.py:71— MindsIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 7, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MixcloudIE._real_extract (cognitive 20) youtube_dl/extractor/mixcloud.py:99— MixcloudIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, boolean chains 7, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NownessBaseIE._extract_url_result (cognitive 20) youtube_dl/extractor/nowness.py:17— NownessBaseIE._extract_url_result has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PyvideoIE._real_extract (cognitive 20) youtube_dl/extractor/pyvideo.py:29— PyvideoIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 4, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoosterTeethIE._real_extract (cognitive 20) youtube_dl/extractor/roosterteeth.py:84— RoosterTeethIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 4, loops 4, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThePlatformIE._real_extract (cognitive 20) youtube_dl/extractor/theplatform.py:235— ThePlatformIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, loops 2, ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZDFBaseIE._extract_ptmd (cognitive 20) youtube_dl/extractor/zdf.py:95— ZDFBaseIE._extract_ptmd has cognitive complexity 20 (threshold 15). Drivers by points: loops 10, if/else 9, boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LazyList.__getitem__ (cognitive 20) youtube_dl/utils.py:4094— LazyList.__getitem__ has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 8, error handling 3 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AparatIE._real_extract (cognitive 19) youtube_dl/extractor/aparat.py:36— AparatIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 4, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ARDIE._real_extract (cognitive 19) youtube_dl/extractor/ard.py:283— ARDIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 4, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CiscoLiveSearchIE._entries (cognitive 19) youtube_dl/extractor/ciscolive.py:120— CiscoLiveSearchIE._entries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EaglePlatformIE._real_extract (cognitive 19) youtube_dl/extractor/eagleplatform.py:123— EaglePlatformIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 2, ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EpornerIE._real_extract (cognitive 19) youtube_dl/extractor/eporner.py:53— EpornerIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 3, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunimationIE._real_extract (cognitive 19) youtube_dl/extractor/funimation.py:81— FunimationIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 7, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IPrimaIE._real_extract (cognitive 19) youtube_dl/extractor/iprima.py:74— IPrimaIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, loops 7, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeezMoviesIE._extract_info (cognitive 19) youtube_dl/extractor/keezmovies.py:37— KeezMoviesIE._extract_info has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 2, error handling 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ManyVidsIE._real_extract (cognitive 19) youtube_dl/extractor/manyvids.py:47— ManyVidsIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 3, loops 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NetEaseMusicBaseIE.extract_formats (cognitive 19) youtube_dl/extractor/neteasemusic.py:113— NetEaseMusicBaseIE.extract_formats has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 4, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ORFONBase._extract_video (cognitive 19) youtube_dl/extractor/orf.py:531— ORFONBase._extract_video has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 3, ternaries 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatreonIE._real_extract (cognitive 19) youtube_dl/extractor/patreon.py:95— PatreonIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RaiPlayPlaylistIE._real_extract (cognitive 19) youtube_dl/extractor/rai.py:365— RaiPlayPlaylistIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, loops 6, boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SkyBaseIE._process_ooyala_element (cognitive 19) youtube_dl/extractor/sky.py:19— SkyBaseIE._process_ooyala_element has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VideaIE._real_extract (cognitive 19) youtube_dl/extractor/videa.py:128— VideaIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, ternaries 4, boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YahooIE._real_extract (cognitive 19) youtube_dl/extractor/yahoo.py:276— YahooIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FFmpegPostProcessor.get_audio_codec (cognitive 19) youtube_dl/postprocessor/ffmpeg.py:157— FFmpegPostProcessor.get_audio_codec has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2, ternaries 2, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
helper.expect_value (cognitive 18) test/helper.py:115— helper.expect_value has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 8, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ADNIE._get_subtitles (cognitive 18) youtube_dl/extractor/adn.py:79— ADNIE._get_subtitles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 3, loops 3, ternaries 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BRMediathekIE._real_extract (cognitive 18) youtube_dl/extractor/br.py:194— BRMediathekIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._search_regex (cognitive 18) youtube_dl/extractor/common.py:1063— InfoExtractor._search_regex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImgurIE._real_extract (cognitive 18) youtube_dl/extractor/imgur.py:95— ImgurIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
KakaoIE._real_extract (cognitive 18) youtube_dl/extractor/kakao.py:53— KakaoIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 4, error handling 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MLBBaseIE._real_extract (cognitive 18) youtube_dl/extractor/mlb.py:16— MLBBaseIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MTVServicesInfoExtractor._get_video_info (cognitive 18) youtube_dl/extractor/mtv.py:132— MTVServicesInfoExtractor._get_video_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, ternaries 4, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PuhuTVSerieIE._extract_entries (cognitive 18) youtube_dl/extractor/puhutv.py:195— PuhuTVSerieIE._extract_entries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 7, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RayWenderlichIE._extract_video_id (cognitive 18) youtube_dl/extractor/raywenderlich.py:54— RayWenderlichIE._extract_video_id has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeachableIE._real_extract (cognitive 18) youtube_dl/extractor/teachable.py:153— TeachableIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Vbox7IE._real_extract (cognitive 18) youtube_dl/extractor/vbox7.py:111— Vbox7IE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 3, error handling 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ViewLiftEmbedIE._real_extract (cognitive 18) youtube_dl/extractor/viewlift.py:94— ViewLiftEmbedIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 2, loops 2, ternaries 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VRVBaseIE._call_cms (cognitive 18) youtube_dl/extractor/vrv.py:65— VRVBaseIE._call_cms has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebcasterIE._real_extract (cognitive 18) youtube_dl/extractor/webcaster.py:30— WebcasterIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: loops 7, if/else 6, ternaries 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XAttrMetadataPP.run (cognitive 18) youtube_dl/postprocessor/xattrpp.py:26— XAttrMetadataPP.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, ternaries 3, error handling 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helper.expect_info_dict (cognitive 17) test/helper.py:209— helper.expect_info_dict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 3, boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL._build_format_filter (cognitive 17) youtube_dl/YoutubeDL.py:1225— YoutubeDL._build_format_filter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YoutubeDL.print_debug_header (cognitive 17) youtube_dl/YoutubeDL.py:2497— YoutubeDL.print_debug_header has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, error handling 3, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
YoutubeDL._write_thumbnails (cognitive 17) youtube_dl/YoutubeDL.py:2680— YoutubeDL._write_thumbnails has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, ternaries 4, error handling 3, boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpFD.real_download (cognitive 17) youtube_dl/downloader/http.py:28— HttpFD.real_download has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, error handling 6, boolean chains 2, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdobeTVBaseIE._parse_video_data (cognitive 17) youtube_dl/extractor/adobetv.py:39— AdobeTVBaseIE._parse_video_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnvatoIE._get_anvato_videos (cognitive 17) youtube_dl/extractor/anvato.py:273— AnvatoIE._get_anvato_videos has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 4, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FazIE._real_extract (cognitive 17) youtube_dl/extractor/faz.py:44— FazIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IndavideoEmbedIE._real_extract (cognitive 17) youtube_dl/extractor/indavideo.py:57— IndavideoEmbedIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IqiyiIE._real_extract (cognitive 17) youtube_dl/extractor/iqiyi.py:339— IqiyiIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MixcloudPlaylistBaseIE._real_extract (cognitive 17) youtube_dl/extractor/mixcloud.py:234— MixcloudPlaylistBaseIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6, if/else 5, boolean chains 3, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NYTimesBaseIE._extract_video_from_id (cognitive 17) youtube_dl/extractor/nytimes.py:23— NYTimesBaseIE._extract_video_from_id has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 6, loops 2, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlatziCourseIE._real_extract (cognitive 17) youtube_dl/extractor/platzi.py:184— PlatziCourseIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SenateISVPIE._real_extract (cognitive 17) youtube_dl/extractor/senateisvp.py:102— SenateISVPIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, loops 4, ternaries 4, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SinaIE._real_extract (cognitive 17) youtube_dl/extractor/sina.py:58— SinaIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TagesschauIE._extract_formats (cognitive 17) youtube_dl/extractor/tagesschau.py:213— TagesschauIE._extract_formats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThePlatformBaseIE._extract_theplatform_smil (cognitive 17) youtube_dl/extractor/theplatform.py:37— ThePlatformBaseIE._extract_theplatform_smil has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TNAFlixNetworkBaseIE._real_extract (cognitive 17) youtube_dl/extractor/tnaflix.py:75— TNAFlixNetworkBaseIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, ternaries 3, loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TurnerBaseIE._extract_ngtv_info (cognitive 17) youtube_dl/extractor/turner.py:223— TurnerBaseIE._extract_ngtv_info has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 4, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TVNetIE._real_extract (cognitive 17) youtube_dl/extractor/tvnet.py:82— TVNetIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 4, loops 3, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YouPornIE._real_extract (cognitive 17) youtube_dl/extractor/youporn.py:116— YouPornIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 4, loops 2, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoExtractor._extract_wowza_formats (cognitive 16) youtube_dl/extractor/common.py:2967— InfoExtractor._extract_wowza_formats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 5, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiscoveryIE._real_extract (cognitive 16) youtube_dl/extractor/discovery.py:64— DiscoveryIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DRTVLiveIE._real_extract (cognitive 16) youtube_dl/extractor/drtv.py:319— DRTVLiveIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 6 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericIE._extract_rss (cognitive 16) youtube_dl/extractor/generic.py:2349— GenericIE._extract_rss has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 3, boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ITVBaseIE._download_webpage_handle (cognitive 16) youtube_dl/extractor/itv.py:55— ITVBaseIE._download_webpage_handle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JojIE._real_extract (cognitive 16) youtube_dl/extractor/joj.py:51— JojIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 4, loops 3, ternaries 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NBCNewsIE._real_extract (cognitive 16) youtube_dl/extractor/nbc.py:376— NBCNewsIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlaytvakIE._real_extract (cognitive 16) youtube_dl/extractor/playtvak.py:102— PlaytvakIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScreencastIE._real_extract (cognitive 16) youtube_dl/extractor/screencast.py:61— ScreencastIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.