metalx1000

Bulk Download this year's Daily Audio Bible Files DAB

Jan 1st, 2019
779
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.37 KB | None | 0 0
  1. #!/bin/bash
  2. ######################################################################
  3. #Copyright (C) 2018  Kris Occhipinti
  4. #https://filmsbykris.com
  5.  
  6. #This program is free software: you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation, either version 3 of the License, or
  9. #(at your option) any later version.
  10.  
  11. #This program is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. #GNU General Public License for more details.
  15.  
  16. #You should have received a copy of the GNU General Public License
  17. #along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18. ######################################################################
  19.  
  20. function main(){
  21.   echo "Welcome..."
  22.   getlist|while read link;
  23.   do
  24.     url="https://player.dailyaudiobible.com${link}"
  25.     m4a="$(wget -qO- "$url"|\
  26.      grep m4a|\
  27.      sed 's/"url":"/\n/g'|\
  28.      tail -n1|\
  29.      cut -d\" -f1|\
  30.      sed 's/\\//g')"
  31.    if [ "$m4a" != "" ]
  32.    then
  33.      echo "Download link is $m4a"
  34.      wget -c "$m4a"
  35.    fi
  36.  done
  37.  exit 0
  38. }
  39.  
  40. function getlist(){
  41.  url="https://player.dailyaudiobible.com/dab/91881"
  42.  wget -qO- "$url"|\
  43.    grep "dab/[0-9]"|\
  44.    cut -d\" -f2  
  45. }
  46.  
  47. main
Add Comment
Please, Sign In to add comment