Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
youtube-dl cache to fasten download #1846
Comments
|
The The problem with caching the playlist (apart from having to actually write, test, and integrate the code) is that at least I don't see an obvious way to detect changed titles or changed playlists in general. I may be mistaken, so feel free to suggest code that caches the playlist results. What really would help here is #1816, but we still have to download the playlist itself. We may do that asynchronously in the future, but that may take some time. I am not sure what your scenario is though - why do you want to download just a single video from a large playlist? This sounds like you have a program that presents a list of videos to the user. In that case, the correct action is to store the ID alongside the title, and just request the video by ID. This will then work even if a typo in the title is corrected between display and download. I'm closing this issue now, since I don't see any way to prevent the aforementioned downsides for a cache of playlist contents, and #1816 already tracks speedup of |
|
Although my issue isn't with --match-title and more with --dateafter (Referred to from #1816), it would SEEM (I've done very little work with Youtube, however, so, I may be wrong) that all videos are in chronological order, as shown here:-
So, the second it matches one that's out of date, shouldn't it just pack up, break the loop, and be done? |
took me some time to figure out what was wrong, but the solution is easy so I figured it might be useful to add to the FAQ vidify#96 ytdl-org/youtube-dl#6451 (comment) ytdl-org/youtube-dl#1846
I am using youtube-dl under macports (osx 10.9). I like to use filters like (--match-title REGEX or --date) to download a single video of specific youtube user.
for a specific date, I use
youtube-dl --date ymd ytuser:gronkh
filtered one
youtube-dl ytuser:Gronkh --match-title '(?=._Minecraft)(?=._1170)'
In all the cases it's indexing the whole playlist of the ytuser, no matter even if I want to download a single video.
[youtube:user] Gronkh: Downloading video ids from 1 to 51
[youtube:user] Gronkh: Downloading video ids from 51 to 101
[youtube:user] Gronkh: Downloading video ids from 101 to 151
[youtube:user] Gronkh: Downloading video ids from 151 to 201
[youtube:user] Gronkh: Downloading video ids from 201 to 251
[youtube:user] Gronkh: Downloading video ids from 251 to 301
[youtube:user] Gronkh: Downloading video ids from 301 to 351
I thought this happens just first for the fist time for a new youtube user but this happens all the time for the same user, which is taking hell of time to download a single video. I know that I can use URL for a single video but I want to automate with filter based script.
I also tried specifying cache directory which did nothing, I can see any cache files
youtube-dl --cache-dir ~/Downloads/test/ ytuser:gronkh
Is there any way to fast-up this process? thanks