I made a script to download a playlist from a YouTube channel as a single JSON file, then automatically edit it as a plain text list. It's based on yt-dlp and sfk which I mentioned there. Attached are the script itself in its current state, and an example of a plain text list generated with it.
1) Would it be possible to also get the upload date just as quickly and conveniently?
I made quite extensive tests months ago, and found out that:
– using “--flat-playlist --write-pages --dump-single-json” allows to quickly create a JSON file containing, for all videos available on a channel (even those with restricted access), their link, their title, their duration, the number of views, but not the upload date (also for “shorts” there is no duration, only the number of views, which seems less precise than for “regular” videos);
– using something like:
allows to get the upload date, and many other available fields with the --print option, but it's much slower (~5s of processing for each video so it can take hours for a large channel), videos in restricted access are skipped (unless using --cookies to get videos with an age limit), and it can cause a temporary ban (less likely to happen when using --cookies but it's probably bound to happen as well when processing hundreds of videos in a row).Code:yt-dlp %link% --skip-download --print %%(id)s --print %%(upload_date)s --print %%(duration_string)s --print %%(title)s >>"%channel_id%.txt"
2) I added replacement formulas for characters encoded as “\u####”, those found in a few lists, plus a few more that could be expected (in French language in particular). Considering that the “####” code corresponds to the character's ASCII code (for instance [hex] 00E9 => [dec] 233, ALT+0233 => é), would there be a way to systematically convert those “\u####” codes to the corresponding character?
3) Could it be improved in any other way? (I only made a few tests, perhaps it won't work well with other channels.)
Or are there existing scripts / tools doing the same thing more efficiently and/or more reliably?
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
Automatically download new videos from a YouTube channel & a specific page
By KingKongGotNoBalls in forum Newbie / General discussionsReplies: 0Last Post: 14th Oct 2024, 10:17 -
YouTube Channel Bulk Video Download
By takistexas in forum Video Streaming DownloadingReplies: 2Last Post: 13th Aug 2023, 08:21 -
wayback machine download youtube video from yt channel
By s810gfx in forum MacReplies: 9Last Post: 11th Aug 2022, 02:12 -
any script or comment to download playlist
By ahmedani in forum Video Streaming DownloadingReplies: 0Last Post: 5th Jul 2022, 07:20 -
youtube-dl FFmpeg script drag drop paste url download convert
By vaype_naysh in forum Newbie / General discussionsReplies: 0Last Post: 20th Sep 2021, 14:12



Quote