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:
@@ -2,6 +2,7 @@
|
||||
|
||||
A real Short returns HTTP 200 at that URL; a regular video redirects to /watch.
|
||||
This uses no API quota."""
|
||||
|
||||
import httpx
|
||||
|
||||
SHORTS_URL = "https://www.youtube.com/shorts/{video_id}"
|
||||
@@ -16,9 +17,7 @@ _HEADERS = {
|
||||
def probe_is_short(client: httpx.Client, video_id: str) -> bool | None:
|
||||
"""True if a Short, False if a regular video, None if undetermined (retry later)."""
|
||||
try:
|
||||
resp = client.get(
|
||||
SHORTS_URL.format(video_id=video_id), follow_redirects=False
|
||||
)
|
||||
resp = client.get(SHORTS_URL.format(video_id=video_id), follow_redirects=False)
|
||||
except httpx.HTTPError:
|
||||
return None
|
||||
if resp.status_code == 200:
|
||||
|
||||
Reference in New Issue
Block a user