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

Retrieve N most recent from playlist #25048

Closed
cmeu opened this issue Apr 28, 2020 · 1 comment
Closed

Retrieve N most recent from playlist #25048

cmeu opened this issue Apr 28, 2020 · 1 comment
Labels

Comments

@cmeu
Copy link

@cmeu cmeu commented Apr 28, 2020

Checklist

  • I'm reporting a feature request
  • I've verified that I'm running youtube-dl version 2020.03.24
  • I've searched the bugtracker for similar feature requests including closed ones

Description

Need the ability to retrieve the n most-recently uploaded videos from a playlist of a variable length.

I use youtube-dl to keep on top of all my favorite youtube vlogs via crontab, for consumption in my own media streamer, hosted on my LAN. Some vloggers sort their playlist with the oldest video first, so my normal method of using a script to set --playlist-end to a fixed number results in the first N videos from the list being downloaded each day, instead of the last. Therefore none of the new content ever downloads.

I have tried to use the --dateafter filter to prevent downloading titles more recent than an aribtrary cutoff (relative date), but this simply prevents the old videos from downloading -- it still never validates any newer items from the playlist. I do not wish to download the entire playlist every time my cron job runs, obviously - I already have that content cached.

I have also tried using the --playlist-reverse switch, but that merely controls the download order, not the order in which the list is evaluated.

Ideally an option that handles this for me (eg: --n-recent ) would be created that would pull all titles and upload dates from the playlist, sort them and then return the n most recent in order of recency.

Alternatively, provide an option to control how the list is sorted before the playlist-end flag takes effect so that I can --playlist-reverse and --playlist-end 3 to get the 3 newest titles (not the first three titles downloaded in reverse order.)

@cmeu cmeu added the request label Apr 28, 2020
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 28, 2020

Technically impossible. Youtube does not provide ability to enumerate playlists from the end.

@dstftw dstftw closed this Apr 28, 2020
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.