style: apply ruff format across backend + scripts (line-length 100)

Mechanical, whole-tree `ruff format` pass — no behaviour change. Recorded in
.git-blame-ignore-revs (next commit) so git blame skips it.
This commit is contained in:
2026-08-23 07:43:06 +02:00
parent 434a98d6ed
commit b1832afd18
217 changed files with 3149 additions and 1744 deletions
+3 -11
View File
@@ -16,6 +16,7 @@ only difference is the cursor is an InnerTube *continuation token*, not a Data A
``published_at`` is left ``None`` (the scrape only exposes a relative time like "3 years ago");
the real date is filled by the videos.list enrich. ``live_broadcast`` is reported as ``"none"``
and live/upcoming filtering happens post-enrich via ``live_status`` (same as the API path)."""
import re
import httpx
@@ -88,12 +89,7 @@ def _video_item(vr: dict) -> dict | None:
channel_id = channel_title = None
if runs:
channel_title = runs[0].get("text")
channel_id = (
runs[0]
.get("navigationEndpoint", {})
.get("browseEndpoint", {})
.get("browseId")
)
channel_id = runs[0].get("navigationEndpoint", {}).get("browseEndpoint", {}).get("browseId")
thumbs = (vr.get("thumbnail") or {}).get("thumbnails") or []
return {
"id": vid,
@@ -129,11 +125,7 @@ def _find_continuation(obj) -> str | None:
if isinstance(obj, dict):
cir = obj.get("continuationItemRenderer")
if isinstance(cir, dict):
tok = (
cir.get("continuationEndpoint", {})
.get("continuationCommand", {})
.get("token")
)
tok = cir.get("continuationEndpoint", {}).get("continuationCommand", {}).get("token")
if tok:
return tok
for v in obj.values():