Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question (Possible Feature Request) Regarding --match-title #9467

Closed
wright546 opened this issue May 12, 2016 · 3 comments
Closed

Question (Possible Feature Request) Regarding --match-title #9467

wright546 opened this issue May 12, 2016 · 3 comments

Comments

@wright546
Copy link

@wright546 wright546 commented May 12, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.05.10
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

I'm using "ytsearchdate10:termA termB termC" in a script run every 48 hours via cron to download certain videos that are uploaded to Youtube on a daily/weekly basis.

From what I can tell --match-title works as logical "or", meaning that "--match-title term1|term2" will match a video with either term1 or term2 in the title. Is there a way to make --match-title function as logical "and"? So that a video would only download if term1 and term2 were both in the title?

Thank you for your help!

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 12, 2016

--match-title accepts arbitrary regular expression, e.g. term1.*term2.

@dstftw dstftw closed this May 12, 2016
@phihag
Copy link
Contributor

@phihag phihag commented May 12, 2016

@dstftw is right, but term1.*term2 requires term1 to come before term2. To match both ignoring order use positive lookaheads:

$ youtube-dl -e test:youtube:playlist --match-title 'youtube'
Download Youtube Playlist with Youtube-dl
Updating youtube-dl
37 youtube-dl - faster downloads with aria2 (Programothesis by emailatask.com)
$ youtube-dl -e test:youtube:playlist --match-title 'youtube.*download'
37 youtube-dl - faster downloads with aria2 (Programothesis by emailatask.com)
$ # ^^ "youtube" before "download" ^^    vv "youtube" AND "download" vv
$ youtube-dl -e test:youtube:playlist --match-title '^(?=.*youtube)(?=.*download)'
Download Youtube Playlist with Youtube-dl
37 youtube-dl - faster downloads with aria2 (Programothesis by emailatask.com)
@wright546
Copy link
Author

@wright546 wright546 commented May 12, 2016

That is very helpful, thank you both very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.