ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.04k stars 10.01k forks source link

--reject-title exact match #21349

Open oamaya724 opened 5 years ago

oamaya724 commented 5 years ago

Checklist

Question

I'm trying to download videos from a certain channel that contain the word "First" in their title, but I want to avoid downloading videos that contain "Mythic+" in their title. The thing is, there are a lot of those "First" videos that contain the word "Mythic" and I can't download them because of my "Mythic+" filter. I'm using:

youtube-dl -f '(299/137/298/136)+(251/bestaudio)' -o '/Volumes/Oliver HDD/Method/%(autonumber)s - %(release_date)s - %(title)s.%(ext)s' --match-title 'First' --reject-title 'Mythic+' https://www.youtube.com/watch?v=RubXDO7TYVs

And I'm getting: "Method VS G'huun WORLD FIRST - Mythic Uldir" title matched reject pattern "Mythic+".

Is there any way to do this?

I'd appreciate any help!

namekal commented 5 years ago

--reject-title accepts regex strings, so currently with your format, it will match anything from Mythic (example) to Mythicccccccc (example) What you'll have to do is escape the + so that it looks for the literal character +

--reject-title 'Mythic\+' (example)

youtube-dl -f '(299/137/298/136)+(251/bestaudio)' -o '/Volumes/Oliver HDD/Method/%(autonumber)s - %(release_date)s - %(title)s.%(ext)s' --match-title 'First' --reject-title 'Mythic\+' https://www.youtube.com/watch?v=RubXDO7TYVs