Skip to content

Add YouTube channel extraction and display support#338

Merged
JesperDramsch merged 7 commits intomainfrom
claude/fix-youtube-link-extractor-5URGf
Apr 18, 2026
Merged

Add YouTube channel extraction and display support#338
JesperDramsch merged 7 commits intomainfrom
claude/fix-youtube-link-extractor-5URGf

Conversation

@JesperDramsch
Copy link
Copy Markdown
Owner

Summary

This PR adds support for extracting and displaying YouTube channel links from conference websites, alongside existing social media integrations (Mastodon, Bluesky).

Key Changes

  • YouTube link extraction: Added detection of YouTube channel links in extract_links_from_url() function, supporting both youtube.com/@channel and youtu.be short links
  • Mastodon/YouTube disambiguation: Updated Mastodon detection logic to exclude YouTube domains that also use the /@username URL pattern, preventing misclassification
  • Schema updates: Added youtube field to the Conference data model with HttpUrl validation
  • UI display: Added YouTube icon and link display in conference detail pages (conference.html, summary.html) and index rows (index_conf_title_row.html)
  • Data serialization: Updated field serializers and JSON output to include YouTube URLs
  • Comprehensive testing: Added 10 test cases covering YouTube detection, disambiguation from Mastodon, short link handling, and multi-social-media scenarios

Implementation Details

  • YouTube detection checks for both youtube.com and youtu.be domains
  • Only the first YouTube link is retained (consistent with other social media fields)
  • YouTube links are explicitly excluded from Mastodon detection to prevent false positives
  • Uses Font Awesome icons (fa-brands fa-youtube) for consistent UI styling
  • YouTube field is optional and follows the same validation pattern as other URL fields

https://claude.ai/code/session_0154a8RdG7M2nj83zPWVodgZ

claude added 2 commits March 18, 2026 11:06
…ce link

YouTube URLs with /@channel patterns were incorrectly matched as Mastodon
profiles. This fixes the extractor to properly identify YouTube links and
adds YouTube as a first-class conference field for enrichment and display.

- Fix extract_links_from_url to detect YouTube before generic /@username
- Add youtube field to Conference schema, validation, and data model
- Add YouTube display on conference detail pages
- Add tests for YouTube extraction and Mastodon disambiguation

https://claude.ai/code/session_0154a8RdG7M2nj83zPWVodgZ
Bluesky and YouTube data was being tracked but never shown to users.
Add display links to conference detail pages, summary pages, and the
index listing row using Font Awesome brand icons.

https://claude.ai/code/session_0154a8RdG7M2nj83zPWVodgZ
@github-actions github-actions Bot added the Tests label Apr 18, 2026
Comment thread utils/enrich_tba.py Fixed
Comment thread utils/enrich_tba.py Fixed
Comment thread utils/enrich_tba.py Fixed
Comment thread utils/enrich_tba.py Fixed
claude added 2 commits April 18, 2026 18:02
CodeQL flagged the substring checks ("youtube.com" in domain) as
incomplete URL sanitization — a host like evil-youtube.com.attacker
could match. Replace with a _domain_matches helper that accepts an
exact host or a proper subdomain, and reuse it for Twitter/X.

Also collapses the line Ruff E501 on the combined Twitter/YouTube
skip condition into a readable form.

https://claude.ai/code/session_0154a8RdG7M2nj83zPWVodgZ
pyupgrade v3.15.2 crashes on Python 3.14 with a TypeError from
tokenize.cookie_re — it passes a str where newer CPython expects a
bytes pattern. pre-commit.ci runs on Python 3.14, so the hook was
failing on every PR regardless of the diff. Bumping to v3.21.2 picks
up the upstream fix.

https://claude.ai/code/session_0154a8RdG7M2nj83zPWVodgZ
@JesperDramsch JesperDramsch merged commit b52e2cc into main Apr 18, 2026
11 checks passed
@JesperDramsch JesperDramsch deleted the claude/fix-youtube-link-extractor-5URGf branch April 18, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants