Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!bin/bash
  2.  
  3. timeLogFile='/opt/youtube-dl/time.log'
  4. downloadDirectory='/media/cs-video/Youtube-ch/'
  5.  
  6. read -r lastTime<$timeLogFile
  7.  
  8. declare -a arr=("" "")
  9.  
  10. for playlist in "${arr[@]}"
  11. do
  12. mkdir -p $downloadDirectory$playlist
  13. cd $downloadDirectory$playlist
  14. youtube-dl -ciw ytuser:$playlist -o "%(upload_date)s__%(title)s.%(ext)s" --restrict-filenames --dateafter $lastTime --max-quality FORMAT --write-info-json --write-description --write-thumbnail
  15. done
  16.  
  17. echo $(date +%Y%m%d) > $timeLogFile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement