Browse Source

Daownload video script

master
Alexei Bezborodov 3 years ago
parent
commit
58bbb47895
  1. 1
      InternetVideo/dl-list
  2. 4
      InternetVideo/dl_video
  3. 25
      InternetVideo/run

1
InternetVideo/dl-list

@ -0,0 +1 @@
# name url

4
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

25
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
Loading…
Cancel
Save