diff --git a/Dockerfile b/Dockerfile index ba7a7ae..3b165ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 -RUN pip3 install youtube_dl +RUN pip3 install yt-dlp ADD youtube-dl.conf /etc/youtube-dl.conf ADD entrypoint.sh /usr/local/bin/entrypoint.sh diff --git a/bin/download-interesting-channels b/bin/download-interesting-channels deleted file mode 100755 index 8a3e399..0000000 --- a/bin/download-interesting-channels +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -DEST="/storage/scratch/youtube" - -CHANNELS="" - -CHANNELS+=" https://www.youtube.com/channel/UCm9K6rby98W8JigLoZOh6FQ/videos" # the lockpicking lawyer -CHANNELS+=" https://www.youtube.com/user/DeviantOllam/videos" # deviant ollam -CHANNELS+=" https://www.youtube.com/user/Vsauce/videos" # vsauce, michael here -CHANNELS+=" https://www.youtube.com/user/featony/videos" # this old tony -CHANNELS+=" https://www.youtube.com/channel/UCworsKCR-Sx6R6-BnIjS2MA/videos" # clickspring -CHANNELS+=" https://www.youtube.com/user/arduinoversusevil/videos" # AvE -CHANNELS+=" https://www.youtube.com/user/Abom79/videos" # Abom79 -CHANNELS+=" https://www.youtube.com/user/saunixcomp/videos" # NYC CNC - -CHANNELS+=" https://www.youtube.com/channel/UCZaDAUF7UEcRXIFvGZu3O9Q/videos" # dirtyUSMLE -CHANNELS+=" https://www.youtube.com/channel/UC-i2EBYXH6-GAglvuDIaufQ/videos" # Speedy Pharmacology -CHANNELS+=" https://www.youtube.com/channel/UC_yjveGdyx6mqqHkHaD-_bg/videos" # Larry Mellick -CHANNELS+=" https://www.youtube.com/channel/UC54htze_JB0zz9H6oAbMOJQ/videos" # Medskl -CHANNELS+=" https://www.youtube.com/channel/UCXAfmcfOeS0rxDz6sp0cYYg/videos" # AANS Neurosurgery -CHANNELS+=" https://www.youtube.com/channel/UC85VW73bQLEjs_taFKP7TwQ/videos" # Nucleus Medical Media -CHANNELS+=" https://www.youtube.com/channel/UC9RM-iSvTu1uPJb8X5yp3EQ/videos" # Wendover -CHANNELS+=" https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA/videos" # Veritasium -CHANNELS+=" https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q/videos" # Kurzgesagt -CHANNELS+=" https://www.youtube.com/channel/UC88tlMjiS7kf8uhPWyBTn_A/videos" # captain joe - -for CHANNEL in $CHANNELS; do - docker run \ - -v $DEST:/output \ - -e DOWNLOAD_URL="$CHANNEL" \ - sneak/youtube-dl -done diff --git a/bin/ytdl b/bin/ytdl deleted file mode 100755 index 80f7f28..0000000 --- a/bin/ytdl +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -docker run \ - -v /storage/scratch/youtube:/output \ - -e DOWNLOAD_URL="$1" \ - sneak/youtube-dl diff --git a/entrypoint.sh b/entrypoint.sh index fbfc126..d240103 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,65 @@ #!/bin/bash -umask 0000 -youtube-dl --config-location /etc/youtube-dl.conf "$DOWNLOAD_URL" +DEST="/output" + +function writeChannels { + O="$DEST/channels.txt" + rm "$O" + # the lockpicking lawyer + echo "https://www.youtube.com/channel/UCm9K6rby98W8JigLoZOh6FQ/videos" >> $O + # deviant ollam + echo "https://www.youtube.com/user/DeviantOllam/videos" >> $O + # vsauce, michael here + echo "https://www.youtube.com/user/Vsauce/videos" >> $O + # this old tony + echo "https://www.youtube.com/user/featony/videos" >> $O + # clickspring + echo "https://www.youtube.com/channel/UCworsKCR-Sx6R6-BnIjS2MA/videos" >> $O + # AvE + echo "https://www.youtube.com/user/arduinoversusevil/videos" >> $O + # Abom79 + echo "https://www.youtube.com/user/Abom79/videos" >> $O + # NYC CNC + echo "https://www.youtube.com/user/saunixcomp/videos" >> $O + # dirtyUSMLE + echo "https://www.youtube.com/channel/UCZaDAUF7UEcRXIFvGZu3O9Q/videos" >> $O + # Speedy Pharmacology + echo "https://www.youtube.com/channel/UC-i2EBYXH6-GAglvuDIaufQ/videos" >> $O + # Larry Mellick + echo "https://www.youtube.com/channel/UC_yjveGdyx6mqqHkHaD-_bg/videos" >> $O + # Medskl + echo "https://www.youtube.com/channel/UC54htze_JB0zz9H6oAbMOJQ/videos" >> $O + # AANS Neurosurgery + echo "https://www.youtube.com/channel/UCXAfmcfOeS0rxDz6sp0cYYg/videos" >> $O + # Nucleus Medical Media + echo "https://www.youtube.com/channel/UC85VW73bQLEjs_taFKP7TwQ/videos" >> $O + # Wendover + echo "https://www.youtube.com/channel/UC9RM-iSvTu1uPJb8X5yp3EQ/videos" >> $O + # Veritasium + echo "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA/videos" >> $O + # Kurzgesagt + echo "https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q/videos" >> $O + # captain joe + echo "https://www.youtube.com/channel/UC88tlMjiS7kf8uhPWyBTn_A/videos" >> $O +} + +function main { + init + writeChannels + while true ; do + download + sleep 3600 + done +} + +function init { + umask 0000 + cd "$DEST" +} + +function download { + for CHANNEL in $(cat channels.txt); do + yt-dlp --config-location /etc/youtube-dl.conf $CHANNEL + done +} + diff --git a/youtube-dl.conf b/youtube-dl.conf index 1344ef8..dc2c24e 100644 --- a/youtube-dl.conf +++ b/youtube-dl.conf @@ -4,6 +4,8 @@ --all-subs --embed-subs --embed-thumbnail +--sponsorblock-mark all +--sponsorblock-remove sponsor,intro,outro,selfpromo,preview,filler --match-filter "playlist_title != 'Liked videos' & playlist_title != 'Favorites'" -f "(bestvideo[vcodec^=av01][height>=1080][fps>30]/bestvideo[vcodec=vp9.2][height>=1080][fps>30]/bestvideo[vcodec=vp9][height>=1080][fps>30]/bestvideo[vcodec^=av01][height>=1080]/bestvideo[vcodec=vp9.2][height>=1080]/bestvideo[vcodec=vp9][height>=1080]/bestvideo[height>=1080]/bestvideo[vcodec^=av01][height>=720][fps>30]/bestvideo[vcodec=vp9.2][height>=720][fps>30]/bestvideo[vcodec=vp9][height>=720][fps>30]/bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec=vp9.2][height>=720]/bestvideo[vcodec=vp9][height>=720]/bestvideo[height>=720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio)/best" --merge-output-format mkv