diff --git a/README.md b/README.md index a36046f..fd909db 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,15 @@ ### How does this work? -This is a shell script. It scape 1337x and get the magnet link. -After this it use [peerflix](https://github.com/mafintosh/peerflix) to stream the video from magnet link. +This is a shell script. It scrapes 1337x and gets the magnet link. +After this it uses [peerflix](https://github.com/mafintosh/peerflix) to stream the video from the magnet link. For scraping script use simple gnu utils like sed, awk, paste, cut. ## Requirements -* [peerflix](https://github.com/mafintosh/peerflix) - A tool to stream torrent. `sudo npm install peerflix -g` +* [peerflix](https://github.com/mafintosh/peerflix) - A tool to stream torrent. + +* [fzf](https://github.com/junegunn/fzf) - A command-line fuzzy finder. ## Installation diff --git a/notflix b/notflix index f74f6a1..55b0914 100755 --- a/notflix +++ b/notflix @@ -1,6 +1,6 @@ #!/bin/sh query=$(printf '%s' "$*" | tr ' ' '+' ) -movie=$(curl -s https://1337x.wtf/search/$query/1/ | grep -Eo "torrent\/[0-9]{7}\/[a-zA-Z0-9?%-]*/" | head -n 1) +movie=$(curl -s https://1337x.wtf/search/$query/1/ | grep -Eo "torrent\/[0-9]{7}\/[a-zA-Z0-9?%-]*/" | grep -Po '^.{16}\K.*' | fzf) magnet=$(curl -s https://1337x.wtf/$movie | grep -Po "magnet:\?xt=urn:btih:[a-zA-Z0-9]*" | head -n 1) peerflix -k $magnet