Advertisement
metalx1000

Stream TV and Movies

Oct 15th, 2022
1,297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.41 KB | Source Code | 0 0
  1. #!/bin/bash
  2. ######################################################################
  3. #Copyright (C) 2022  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. domain="https://www.2embed.to"
  21. [[ "$*" ]] && q="$*" || read -p "Enter Movie or Show Title: " q
  22. [[ "$q" ]] || exit
  23.  
  24. results="$(wget -qO- "$domain/library/search?keyword=$q"|grep "d-block")"
  25.  
  26. function list(){
  27.   while read l
  28.   do
  29.     url="${domain}$(echo $l|cut -d\" -f2)"
  30.     title="$(echo $l|cut -d\> -f2)"
  31.     echo -e "$title|$url"
  32.   done < <(echo $results|tr "<" "\n"|grep "bop-name")
  33. }
  34.  
  35. selection="$(list|fzf)"
  36. [[ $selection ]] || exit
  37.  
  38. url="$(echo $selection|cut -d\| -f2)"
  39. echo "$url"
  40. echo ": $(date +%s):0;open \"$url\"" > $HOME/.zsh_history
  41. open "$url"
  42.  
Tags: movies
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement