Guest User

dl-maus-2021.sh

a guest
Oct 23rd, 2021
143
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. # Usage: ./dl-maus-2021.sh https://www.wdrmaus.de/filme/sachgeschichten/abblendspiegel.php5 'Abblendspiegel.mp4'
  3.  
  4. set -eu
  5.  
  6. URL="$1"
  7. NAME="$2"
  8.  
  9. (
  10. mkdir -p "tmp"
  11. cd "tmp"
  12.  
  13. formatsURL="$(wget -qO - "$1" | grep '/deviceids-medp.wdr.de/ondemand/' | cut -d"'" -f6)"
  14. ratesURL="https:$(wget -qO - "$formatsURL" | cut -d'"' -f 16)"
  15. listURL="$(wget -qO - "$ratesURL" | grep https | grep _av.m3u8 | head -n 3 | tail -n 1)"
  16. wget -qO - "$listURL" | grep https | while read u; do
  17. wget "$u"
  18. done
  19. )
  20.  
  21. ls -rt tmp/segment* | xargs cat -- | pv > "$2"
  22. rm -rv tmp
  23.  
RAW Paste Data