1

I want to downloand all videos by a specific YouTube channel uploaded before a specific date with youtube-dl. Hence, I did youtube-dl <url_to_youtube_channel> --datebefore <date>. Before the videos are downloaded, youtube-dl first downloads the video webpages to check whether the upload date is before the specified date ("Downloading webpage").

The channel, however, has already uploaded approx. 1700 videos and thus downloading all webpages takes quite a bit of time. On top of that, I plan to run the above command multiple times for different dates. Thus, I wonder if there is a way to speed up the process? Can youtube-dl maybe download a video's URL together with the creation date? In this case I could build a lookup table to extract the wanted URLs and then provide them directly to youtube-dl (the paramter --datebefore would be redundant then).

3
  • 2
    Please don't post images of text. Copy the output information and paste as text, you can then format it as code. May 13, 2021 at 20:34
  • Alright, should I edit my post and replace the image by text?
    – Joe
    May 13, 2021 at 20:59
  • Jes, that's it! May 13, 2021 at 21:03

1 Answer 1

3

If you need that level of control, you might ask youtube-dl to first fetch and dump the information, to build your database. Later you can use youtube-dl to download just the videos you want.

This is an example, note that you can write your own json filter and output. For example:

$ youtube-dl --skip-download --print-json <URL-CHANNEL> | jq --join-output '.upload_date," ",.id," ",.title,"\n"'
DATE1 ID1 TITLE1
DATE2 ID2 TITLE2
...

The result is a text file, you can then process it as desired to filter the ids for youtube-dl's actual download.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .