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

Please add a possibility to only download a video if its upload date is known. #4916

Closed
GijsTimmers opened this issue Feb 9, 2015 · 2 comments
Closed

Comments

@GijsTimmers
Copy link

@GijsTimmers GijsTimmers commented Feb 9, 2015

I often use the following command:

$ youtube-dl -o "%(upload_date)s_%(title)s.%(ext)s" <youtube URL>

While this usually returns the date as part of the filename, it sometimes can't fetch the date and will return something like NA_Big_Buck_Bunny.mp4 as its filename.

Right now, I run a script after downloading that removes all NA_ files, using a regex. But this is cumbersome.

Therefore, it would be nice to be able to download a video only if its date is known. But this option doesn't exist at the moment. I was thinking of an extra option in the --date switch:

# Download only the videos uploaded on January 1, 1970
$ youtube-dl --date 19700101

# Download only the videos with a valid upload date
$ youtube-dl --date any

What do you think? If this option is not desired, could you think of another way to solve this problem?

@phihag phihag closed this in 347de49 Feb 10, 2015
@phihag
Copy link
Contributor

@phihag phihag commented Feb 10, 2015

Thank you for report. Since youtube-dl 2015.02.10.2 there is a generic filtering mechanism which can be employed by adding --match-filter "upload_date". This may seem to be a roundabout way at first, but is actually way more powerful. See our FAQ if you need help updating.

@GijsTimmers
Copy link
Author

@GijsTimmers GijsTimmers commented Feb 10, 2015

Exactly what I was looking for! Thank you!

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
2 participants
You can’t perform that action at this time.