metalx1000

Stream Movies from WatchSeieshd

May 25th, 2021 (edited)
1,922
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.07 KB | None | 0 0
  1. #!/bin/bash
  2. #Stream movies from your shell
  3.  
  4. clip="xclip"
  5. open="xdg-open"
  6.  
  7. if [[ "$1" == "-h" ]]
  8. then
  9.   echo "Query needed."
  10.   echo "Example: $0 'bloodsport'"  
  11.   echo "or"
  12.   echo "Example: $0 'https://watchserieshd.co/film/freaks-and-geeks-season-1-mwp/watching.html?ep=6'"  
  13.  
  14.   exit 1
  15. fi
  16.  
  17. q="$1"
  18.  
  19. if [[ "$q" == *"watchserieshd"* ]]
  20. then
  21.   url="$q"
  22. elif [[ "$q" == "" ]]
  23. then
  24.   echo "checking clipboard"
  25.   url="$($clip -o)"
  26. else
  27.   url="$(ddgr -w "watchserieshd.co" $q film -n 5 --json|sed 's/watching.html//g'|grep url|grep -v "html"|head -n1|cut -d\" -f4)/watching.html"
  28. fi
  29.  
  30. echo $url
  31. url="$(wget -qO- "$url"|grep btn-eps |grep sb|cut -d\" -f2,4|fzf|cut -d\" -f2)"
  32. echo ": $(date +%s):0;$0 '$url'" >> $HOME/.zsh_history
  33. echo $url
  34. id="$(echo $url|sed 's/embed-/|/g;s/.html//g'|cut -d\| -f2)"
  35. url="https://sbvideo.net/dl?op=download_orig&id=$id"
  36. hash="$(wget -qO- "$url"|grep hash|cut -d\" -f6)"
  37. url="${url}&hash=${hash}"
  38. [[ "$url" == "" ]] && ($open "$url2";exit)
  39. echo $url
  40. url="$(wget -qO- "$url"|grep ".mp4"|head -n1|cut -d\" -f2)"
  41.  
  42. echo $url
  43. mpv "$url"
  44.  
Add Comment
Please, Sign In to add comment