# Changelog of YouTube AI Summary, Transcript & Channel Analytics (`badr_xba/youtube-ai-channel-analytics`) Actor

- **URL**: https://apify.com/badr_xba/youtube-ai-channel-analytics/changelog.md
- **Full Actor documentation**: https://apify.com/badr_xba/youtube-ai-channel-analytics.md

## Changelog

### 0.1.4 (2026-11-12, local, after the re-tests of build 0.1.3)

- **Never silent, never TIMED-OUT.**
  - A "Still working" heartbeat is logged every 30 s, plus one INFO line per attempt (route, player, seconds left).
  - Every platform call before and after the collection is time-bounded (30 s).
  - Each video has a hard limit (240 s).
  - The run stops starting new work 30 s before ACTOR_TIMEOUT_AT. It then ends SUCCEEDED, with the rest in FAILED_INPUTS (TIME_LIMIT).
  - yt-dlp now runs in daemon threads: a hung extraction can neither block other work nor keep the process alive.
- **Players.** `web_safari` is tried first: it is the player that answered in full on Apify IPs, as seen in v2 production run 3SLxV2VyjA2GUYNh2 at attempt 4. The player that last worked is then tried first for the next videos.
- **Owner decision: rows with incomplete details (`partial`, `listing`) are written but free.** RUN_SUMMARY shows `partialRowsNotCharged` and `rowsByDetailsLevel`.
- **Local runs (not on Apify):** with `useApifyProxy: false`, the Apify proxy is never used. The AI key can come from AI_API_KEY_FOR_LOCAL_TEST. The inputs and the run script are in `local-tests/`.

### 0.1.3 (2026-11-12, local, after the re-tests of build 0.1.2)

- A page-only answer from yt-dlp ("No title found in player responses; falling back to title from initial data") is kept as a fallback while the other players are tried. If no full answer comes, it gives a `partial` row (`detailsNote` lists the missing values, captions are `captionsUnavailable`) instead of BLOCKED_BY_YOUTUBE.
- When the circuit breaker is open, each video still gets one attempt (before, it got none).
- Time per item: still 8 attempts, but the window is now 90 s, and each retry gets the time left with a minimum of 45 s. Before, it was 60 s and 20 s; on T7 the 4th attempt only had 29 s.

### 0.1.2 (2026-11-12, local, after the first real runs on build 0.1.1)

- Fix: channel analysis crashed (TypeError dict < dict) when videos shared an approximate date. The analysis can no longer fail the whole channel: a failing section is listed in `unavailableSections`.
- Fix: proxy tunnel failures are retried at once with a new session and logged once. After 6 failures with no success, the datacenter route is dropped. RUN_SUMMARY shows `proxyTunnelFailures` and `datacenterProxyDisabled`.
- Rows built from list data carry `status.detailsNote`, and the README Limits section explains them.
- An unknown AI model stops the run cleanly with a clear message (all 3 providers).

### 0.1 (2026-11-12): first local build, NOT pushed, NOT published

- New Actor built on the owner's YouTube Data Scraper v2 engine (copied, v2 left untouched). The copy keeps:
  - yt-dlp with 8 datacenter attempts;
  - the circuit breaker;
  - enhanced recovery, off by default;
  - source parsing, filters, caption tracks, the BYOK provider layer, redaction and the visual report.
- Sources: videos, channels (URL, ID, @handle) and keyword searches, several of each per run, with limits per channel, per search and per run.
- Date filter (absolute or relative), free.
- Official captions with timestamps. Automatic captions are always marked (`source` / `captionSource: "auto"` plus a note).
- AI (customer's own key, one call per video):
  - short summary, detailed summary and key points;
  - description split into timestamped sections;
  - optional AI channel insights.
- Channel analytics: activity, performance, engagement, format, keywords, rising topics. Deterministic.
- Output separates `youtube` / `computed` / `ai` / `status`, with `sourceUrl` and `collectedAt`. Flat mode available.
- Billing gate: every event is charged only when it is live. The synthetic `apify-default-dataset-item` is never used; it is detected and never doubles a charge.
- Managed-key mode is present but hard-disabled.
- `redact()`: the copied version raised `IndexError` on Google "AQ." keys (wrong pattern index). It is now aligned with the current v2 source, which already has the same fix (`_PATTERNS[:4]`, then the header pattern). The test `test_redaction_patterns` covers all four key shapes.
