Yes. From the youtube-dl man page:
--date DATE
Download only videos uploaded in this date
--datebefore DATE
Download only videos uploaded on or before this date (i.e. inclusive)
--dateafter DATE
Download only videos uploaded on or after this date (i.e. inclusive)
Not stated there, but only hidden in the code, is that DATE
is in the format YYYYMMDD
or
(now|today)[+-][0-9](day|week|month|year)(s)?
, so for example the 17th August 2016 would be 20160817
, and seven days ago would be now-7days
or now-1week
.
You can specify a range by using --datebefore
and --dateafter
together, so:
youtube-dl -i --dateafter 20160808 --datebefore 20160810 https://www.youtube.com/channel/CHANNEL
will download all videos from a channel uploaded between and including August 8th and August 10th 2016, and:
youtube-dl -i --dateafter now-1week https://www.youtube.com/playlist?list=PLAYLIST
will download all videos from a playlist uploaded in the past week.
The -i
option prevents youtube-dl
from exiting prematurely if some videos are unavailable.
Note youtube-dl
will still say it is downloading each video even when it doesn't. For example:
[download] Downloading video 1 of 123
[youtube] xxxxxxxxxxx: Downloading webpage
[youtube] xxxxxxxxxxx: Downloading video info webpage
[youtube] xxxxxxxxxxx: Extracting video information
[youtube] xxxxxxxxxxx: Downloading MPD manifest
[download] 2016-08-07 upload date is not in range 2016-08-08 - 2016-08-10
[download] Downloading video 2 of 123
...
Best Answer
Both parts of this question (downloading in mp3 and downloading a playlist) are supported by
youtube-dl
:Some notes from me and the comments:
Older versions of
youtube-dl
struggle with modern playlists. You might need to replace the repo version with the latest.cmo: You can ignore missing ("unavailable in your country", or removed) videos with an
-i
flag.frans: If your playlist isn't working and the URL contains a
v=<ID>
element, remove it so there's just the?list=...
item in the querystring.