this post was submitted on 12 Nov 2025
9 points (100.0% liked)

Open Source

43850 readers
357 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 6 years ago
MODERATORS
 

So I'm slowly learning how to us yt-dlp and I'm trying to set up a default command to check a number of channels for new videos. Currently I have it set to download the first 10 new vids of each channel, and to skip anything past a certain date, but it takes a while to get to the date information I guess, which adds unnecessary time and checks, especially for channels that don't have any vids that are new enough.

What I'd like it to do is skip the rest of the channel if it encounters a video that was published outside the given date range, but I'm not finding anything so far. Does this functionality exist? Or am I just out of luck?

My current command looks like this:

yt-dlp -t sleep -I1-10 --dateafter 20251031 --sponsorblock-remove sponsor --format "bestvideo*[filesize<3G]+bestaudio/best" --concurrent-fragments 25 --force-write-archive -o '%(uploader)s-%(upload_date)s-%(title)s [%(id)s].%(ext)s' --download-archive "archive.md" --batch-file "subscriptions.md"

top 2 comments
sorted by: hot top controversial new old
[โ€“] onTerryO@lemmy.ca 5 points 2 months ago (1 children)

--break-on-reject should help.

[โ€“] ech@lemmy.ca 1 points 2 months ago

From what I can make out, that and the recommended argument (--break-match-filters) rely on a filters list, which doesn't seem to have a date option of their own. For now I've just added the problematic videos to my archive file, so they won't slow it down anymore, but it feels like it should be possible to halt the script like that. Maybe it's too niche of an edge case.