# Cron Job: yt-sitrep-veritasium

**Job ID:** 1c884d4b603c
**Run Time:** 2026-06-09 07:11:54
**Schedule:** 0 7 * * *

## Prompt

[IMPORTANT: The user has invoked the "youtube-channel-sitreps" skill, indicating they want you to follow its instructions. The full skill content is loaded below.]

---
name: youtube-channel-sitreps
description: "Create recurring YouTube channel sitreps and deliver them to Telegram."
platforms: [linux, macos, windows]
---

# YouTube Channel Sitreps

Use this skill when the user wants a recurring or one-off briefing based on one or more YouTube channels: latest upload, short summary, and a concluding assessment of why it matters in the channel's broader domain.

This is a **briefing workflow**, not a transcript workflow. Use the YouTube content skill for transcript extraction when you need video-level detail; use this skill when the goal is channel monitoring, editorial curation, or scheduled sitreps.

## Typical outputs

- Daily/weekly channel sitreps (compact format)
- **Nieuws24 format** (thematic groups with bold titles + short explanation per item, max 5 videos, concluding takeaway)
- Telegram-delivered briefings
- Multi-channel comparative briefings

## Core workflow

1. **Resolve the channel**
   - Prefer the canonical channel URL or handle.
   - **Verify the channel ID.** The user may provide a wrong UC ID. Use web_search to find the actual `@handle` and extract the correct `UC...` channel ID from the channel's about page or search snippets. Multiple channels can share similar names — verify subscriber count and content theme.
   - Use the channel's `/videos` page to identify the latest public upload.

2. **Extract the minimum useful facts**
   - Latest video title
   - Publish time / freshness (prefer exact ISO dates over relative "X days ago")
   - 1-sentence summary of the video
   - 2-3 recent channel highlights if relevant

   **Workflow priority (try in order):**

   A. **YouTube RSS feed** — `https://www.youtube.com/feeds/videos.xml?channel_id=<VALID_UC_ID>`. When the channel ID is correct, the RSS feed returns reliable data including exact ISO 8601 publish dates, view counts, star ratings, and full descriptions (including chapters). Parse with `grep -E "(<title>|<yt:videoId>|<published>|<media:statistics)"` for a quick overview. The RSS feed is faster than any other method, avoids bot detection entirely, and gives exact dates (not relative timestamps). **RSS works for most channels with a valid UC ID.** If it returns 404, first re-verify the channel ID before concluding RSS is broken.

   B. **curl + CONSENT cookie bypass** — if RSS is confirmed unavailable for this channel. See `references/youtube-sitrep-workflow.md` for the full curl command, JSON path map, and oEmbed recipe.

   C. **FALLBACK (browser)** — only when both RSS and curl fail. YouTube browser sessions loop back to the consent screen because the consent cookie doesn't persist across isolated Hermes browser sessions. Use `browser_console` with JS expression `document.querySelector('a[href*="/watch"]')?.href` to extract the first video URL without relying on the accessibility snapshot.

3. **Add the editorial conclusion**
   - End with a short conclusion about what the latest video means in the channel's wider niche or industry.
   - Keep the conclusion specific, not generic.

4. **Keep it compact**
   - The briefing should be readable in a phone notification.
   - Prefer bullets and short sentences.

## Telegram delivery pattern

When the user asks for scheduled delivery to Telegram:

- Use a cron job with a stable, class-level name.
- Default naming pattern: `yt-sitrep-<channel-slug>`.
- Deliver in the user's language unless they explicitly ask otherwise.
- If the user wants Belgium time, use `Europe/Brussels` and `0 9 * * *`.

## Pitfalls

- Do **not** turn this into a transcript dump.
- Do **not** over-explain the channel; the goal is a sitrep, not a long essay.
- Do **not** invent context that is not supported by the latest upload or recent channel activity.
- If a channel has no meaningful new upload, say so briefly and stop.
- **Channel ID must be correct.** A 404 on the RSS feed often means the channel ID is wrong, not that RSS is unavailable. Verify the channel ID before assuming RSS is broken. The `@handle` from YouTube (with underscores, dashes) is more reliable than a user-stated UC ID.
- **RSS feed is preferred over curl when it works.** RSS gives exact ISO dates, view counts, and full descriptions — no consent cookie needed, no bot detection. Only fall back to curl+CONSENT when the channel ID is verified and RSS still fails.
- **Browser consent loop.** YouTube's consent page (`consent.youtube.com`) loops infinitely in headless browser sessions because the consent cookie doesn't persist across isolated sessions. Prefer RSS or curl+CONSENT-cookie over `browser_navigate` for channel scraping.
- **Accessibility tree truncation.** YouTube's `/videos` page snapshot may not include the `href` of video links in the accessibility tree. Use `browser_console` with JS expressions (not `browser_snapshot`) to extract video URLs when browser fallback is necessary.
- **Localized titles.** The ytInitialData title field may be in a localized language based on the CONSENT cookie locale (e.g., `NL` → Dutch). Verify with the oEmbed API for the original uploader title.
- **[SILENT] delivery for cron jobs.** When running as a cron job and no new videos exist since the last run, respond with exactly `[SILENT]` (nothing else) to suppress delivery. Never combine [SILENT] with content — either report findings normally or deliver [SILENT] alone.

## Related skills

- `youtube-content` for transcript extraction and video-to-text transformation.

## Reference material

See `references/youtube-sitrep-workflow.md` for the reusable briefing template, naming convention, and Telegram cron pattern.

The user has provided the following instruction alongside the skill invocation: [IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user — do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. Never combine [SILENT] with content — either report your findings normally, or say [SILENT] and nothing more.]

Check the Veritasium YouTube channel at https://www.youtube.com/@veritasium for new videos since the last run. Output in nieuws24 format: thematic groups with short title+explanation per item, up to 5 videos max, concluding takeaway. After creating the digest, write the full output to /opt/data/cron/output/yt-veritasium/YYYY-MM-DD.md (create dirs if needed). Then EMAIL the same content to tomstynen@gmail.com with subject "YT Sitrep - Veritasium - YYYY-MM-DD" using the GAPI script at /opt/data/skills/productivity/google-workspace/scripts/google_api.py. Only skip email if the Gmail API fails — still write the local file. If there are NO new videos since last run, write "No new videos" to the file and skip the email.

## Response

Email sent successfully. Now let me write the briefing content also as my final response for Telegram delivery:

---

## YT Sitrep — Veritasium — 2026-06-09

**📡 GPS-storing boven Europa**
**Something is jamming GPS over Europe. Here's what we found** — Derek Muller onderzoekt wie erachter zit dat GPS-signalen boven Europa massaal worden verstoord. Hij traceert de bron samen met UT Austin-onderzoekers via duizenden satellieten en belandt bij Cosmos 2546, een Russisch militair ruimtevaartuig dat mogelijk een geheime berichtendienst verbergt in GPS-interferentie. (6,2M views · 4 juni)

**🗺️ De snelheid van Google Maps**
**Google Maps is unreasonably fast. Let me explain** — Veritasium duikt in de wiskunde achter Google Maps' razendsnelle routeberekening: van Dijkstra's algoritme tot datastructuren die miljarden wegen in milliseconden doorzoeken. (4,8M views · 30 mei)

**Conclusie:** Twee actuele thema's. De GPS-jammingvideo is bijzonder relevant voor Europa — het gaat over een reële, nog actieve verstoring van burger-GPS. De Google Maps-video is klassieke Veritasium: een alledaagse technologie uitpluizen tot op het bot. Complexe systemen uitleggen via echte onderzoeksjournalistiek.

---

✅ Lokaal opgeslagen: `/opt/data/cron/output/yt-veritasium/2026-06-09.md`
✅ Gemaild naar tomstynen@gmail.com
