Reel Mode
Reel mode offers a "TikTok-style" vertical video feed for educational content using YouTube Shorts.
Services
search_youtube_reels(topic, max_results=12)
Located in app.modes.reel.services.youtube_search.
- Function: Searches YouTube API for "short" videos matching the topic.
- Filtering: Appends
#shortsto the query to target vertical videos. - Privacy: Automatically skips videos marked as
privateorembeddable: falseby the API.
validate_videos_batch(videos)
Located in app.modes.reel.services.validator.
- Purpose: Youtube's API
embeddableflag is often inaccurate. This service performs active validation. - Parallel Processing: Uses
ThreadPoolExecutorto validate multiple videos concurrently. - Checks:
- Headers: Checks
X-Frame-OptionsandContent-Security-Policyheaders associated with the embed URL. - Direct Test: detailed in
test_embed_direct(viaembed_checker.py).
- Headers: Checks
- Result: Returns only the list of videos confirmed to be playable in an iframe.