diff --git a/InternetVideo/dl-list b/InternetVideo/dl-list new file mode 100644 index 0000000..ea96cb6 --- /dev/null +++ b/InternetVideo/dl-list @@ -0,0 +1 @@ +# name url diff --git a/InternetVideo/dl_video b/InternetVideo/dl_video new file mode 100755 index 0000000..98aed59 --- /dev/null +++ b/InternetVideo/dl_video @@ -0,0 +1,4 @@ +#!/bin/bash + +/usr/local/bin/youtube-dl --playlist-end 3 --max-downloads 3 -f "worst" -i -o "%(upload_date)s-%(title)s-%(id)s.%(ext)s" $1 +# worstvideo+worstaudio -xwik -r 1M diff --git a/InternetVideo/run b/InternetVideo/run new file mode 100755 index 0000000..966502b --- /dev/null +++ b/InternetVideo/run @@ -0,0 +1,25 @@ +#!/bin/bash + +curdir=$(pwd) + +cd "$curdir" + +cat dl-list | while read LINE; +do + echo "read line: $LINE" + array=(${LINE// / }) + folder=${array[0]} + url=${array[1]} + echo "$(date +%yy%mm%dd-%Hh%Mm%Ss): Folder $folder, Url $url" >> "$curdir/1sys_log.txt" + + cd "$curdir" + + mkdir "$folder" + cd "$folder" + + find . -mtime +30 -type f -delete >> "$curdir/1sys_log.txt" + + $curdir/dl_video $url >> "$curdir/1log.txt" +done + +