SHARE
TWEET

Arte+7 Grabber

a guest Mar 14th, 2012 550 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. url=$1
  4. fileout=$2
  5. lang=$3
  6.  
  7. if [ "$url" = "-h" ]; then
  8.         echo "usage: 'arte_grap.sh URL OUTFILE [lang]'"
  9.         echo ""
  10.         echo "URL: Path to arte+7 video page"
  11.         echo "OUTFILE: Filename to store Video"
  12.         echo "optional: lang = 'fr' for french version, download in german by default. "
  13.         exit 0
  14. fi
  15.  
  16. if [ "$fileout" = "" ]; then
  17.         echo "two arguments required!"
  18.         exit 0
  19. fi
  20.  
  21. if [ "$lang" = "fr" ]; then
  22.         echo "Downloading French Version..."
  23. else
  24.         echo "Downloading German Version..."
  25.         lang="de"
  26. fi
  27.  
  28. langcode1='<video lang="'
  29. langcode3='"'
  30. langcode=$langcode1$lang$langcode3
  31. echo "${langcode}"
  32.  
  33. echo "Downloading" $url "to" $fileout "..."
  34. wget -q $url -O - | grep '<embed src="http' | sed -n -e 's|.*videorefFileUrl=\(.*\)".*|\1|p' | sed -e 's/%2C/,/gi;s/%3A/:/gi;s/%25/%/gi;s/%20/ /gi;s/%09/ /gi;s/%21/!/gi;s/%22/"/gi;s/%23/#/gi;s/%24/\$/gi;s/%26/\&/gi;s/%27/'\''/gi;s/%28/(/gi;s/%29/)/gi;s/%2A/\*/gi;s/%2B/+/gi;s/%2D/-/gi;s/%2E/\./gi;s/%2F/\//gi;s/%3B/;/gi;s/%3D/=/gi;s/%3E//gi;s/%3F/?/gi;s/%40/@/gi;s/%5C/\\/gi;s/%5E/\^/gi;s/%5F/_/gi;s/%7E/~/gi;' | xargs wget -q -O - | grep "${langcode}" | sed -n -e 's|.*ref="\(.*\)" />|\1|p' | xargs wget -q -O - | grep '<url quality="hd">' | sed -n -e 's|<url quality="hd">\(.*\)<\/url>|\1|p' | xargs -I {} rtmpdump -r {} -o $fileout
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top