ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.3k stars 10.03k forks source link

--datebefore and --dateafter function not working #3395

Open FKLinguista opened 10 years ago

FKLinguista commented 10 years ago

Hello all! I just started using youtube-dl and all was going well until I tried to download some videos from a certain YouTube channel from February 1, 2013 to October 26, 2014. Here is the script that I used: youtube-dl --dateafter 20130201 --datebefore 20131026 --download-archive ~/Videos/cluggy/.archive -o "~/Videos/cluggy/%(title)s.%(ext)s" --restrict-filenames https://www.youtube.com/channel/UCckl4Ok39mExuzHxjE-10bg This individual has 150+ videos on his channel, and I discovered after putting in these parameters, that youtube-dl began downloading from the very first video he uploaded and continued on and on until I killed the process from another terminal session. Is this a user error problem or have I uncovered a bug?

FKLinguista

phihag commented 10 years ago

Sorry, I cannot reproduce this. Can you include the output you get with -v?

youtube-dl --get-title https://www.youtube.com/channel/UCckl4Ok39mExuzHxjE-10bg --dateafter 20130201 --datebefore 20131026

outputs

Krashen, Kaufman, Asherr Christophe Clugston: The TRUTH Language
David Mansaray Hides Interview ??? with Christophe Clugston
Fluent Czech uses my  Shoelaces, Functional Language the Truth Christophe Clugston
WHich is the best foreign language to learn Christophe Clugston
The Best resources for Learning French, Christophe Clugston
Absolutely the best languages to learn by Christophe Clugston
Retarded idiots in foreign languages and Kaufman? by Christophe Clugston
Be fluent in foreign languages by Christophe Clugston
Better than LINGQ  best FREE Foreign Language Online Learning, Christophe Clugston
Steve Kaufman, Laoshu505000 & Benny Irish Poly Clod challenged by Christophe Clugston
'Polyglots' scared of ?????, Christophe Clugston
Review: A Polyglot Institute ????? , Christophe Clugston
Finnish Practice vs Richard Simcot: ? of Censorship: Christophe Clugston
The Best u Tube polyglot 2, Christophe Clugston
Shocking news about Steve Kaufman and Prof Arguelles, Christophe Clugston
Best  U Tube polyglot 3 crushes Tim Doner, Christophe Clugston
Steve Kaufman vs Peter Browne 2  why the hate? by Christophe Clugston
German (Eastern BLoc) Volume Language Learning Method, Christophe Clugston

which looks perfectly fine to me. Do you get a different result?

You may be confused by the fact that youtube-dl needs to download the video page to get the upload date. That's because we don't preload the upload date from the playlist, and don't support --date-before there yet.

Jan02 commented 9 years ago

I can reproduce this on windows 7 x64 with latest youtube-dl In my case the dateafter is set to 20141223

X:\Apps\Video\youtube-dl>youtube-dl.exe https://www.youtube.c
om/watch?v=bakOKJFtB-k
[debug] System config: []
[debug] User config: [u'--no-playlist', u'--autonumber-size', u'3', u'--prefer-f
ree-formats', u'--restrict-filenames', u'--prefer-free-formats', u'-o', u'S:\\Do
wnloads\\Video\\%(playlist_title)s\\%(title)s.%(ext)s', u'--reject-title', u'--dateafter', u'20141223', u'-v']
[debug] Command-line args: [u'https://www.youtube.com/watch?v=bakOKJFtB-k']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2015.07.21
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] bakOKJFtB-k: Downloading webpage
[youtube] bakOKJFtB-k: Downloading video info webpage
[youtube] bakOKJFtB-k: Extracting video information
[youtube] bakOKJFtB-k: Downloading DASH manifest
[youtube] bakOKJFtB-k: Downloading DASH manifest
[download] 2013-06-28 upload date is not in range 2014-12-23 - 9999-12-31
dstftw commented 9 years ago

@Jan02 that's correct behavior. What are you trying to achieve?

Jan02 commented 9 years ago

nervermind, it's fine

Butterfly-Dragon commented 3 years ago

wait the normal behavior of youtube-dl is to take the entire playlist and download every single video page excluding the video only after downloading the video page?! isn't there an option to speed this up? It already knows the upload date, so why does it have to download the entire video page? Isn't there at least a way to do this only once (in case it is needed for something) and adding the discarded videos to the video history?