Skip to content

fix(ingest): reject malformed urls before shelling out to yt-dlp - #43

Merged
harshitwandhare merged 1 commit into
mainfrom
fix/validate-video-url-before-ytdlp
Aug 26, 2026
Merged

fix(ingest): reject malformed urls before shelling out to yt-dlp#43
harshitwandhare merged 1 commit into
mainfrom
fix/validate-video-url-before-ytdlp

Conversation

@harshitwandhare

Copy link
Copy Markdown
Owner

fetch_video_transcript builds a yt-dlp argv from whatever url comes in, but only ingest() checked the http/https prefix before ever calling it. A file:// url or one missing a host still made it all the way to subprocess.run.

Added an upfront urlparse check that bails out with None unless the scheme is http/https and there's an actual host, plus tests for both cases.

fetch_video_transcript only checked that ingest() saw an http/https
prefix before calling it, but the function itself never validated the
scheme or host once it had the url. a file:// url or one missing a
host would still build a full yt-dlp argv and hit subprocess.run.
parse the url up front and bail out early if it isn't a real http(s)
url with a host.
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
atlas-ra Error Error Aug 26, 2026 1:01am

@harshitwandhare
harshitwandhare merged commit 00fdd81 into main Aug 26, 2026
14 of 15 checks passed
@harshitwandhare
harshitwandhare deleted the fix/validate-video-url-before-ytdlp branch August 26, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant