Bugswriter / notflix

Notflix is a shell script to search and stream torrent.
GNU General Public License v3.0
1.9k stars 176 forks source link

Using btplay (of btfs) instead of peerflix #92

Open pitsi opened 2 years ago

pitsi commented 2 years ago

As the title suggests, I modded notflix just a little bit so as to use btplay and I can report it works just fine.

#!/bin/sh
query=$(printf '%s' "$*" | tr ' ' '+' )
movie=$(curl -s https://1337x.to/search/$query/1/ | grep -Eo "torrent\/[0-9]{7}\/[a-zA-Z0-9?%-]*/" | head -n 1)
magnet=$(curl -s https://1337x.to/$movie | grep -Po "magnet:\?xt=urn:btih:[a-zA-Z0-9]*" | head -n 1)
btplay -p mpv $magnet

Btplay is part of btfs https://github.com/johang/btfs

---edit on Monday 9th of January 2023 6 months later I discovered that the .wtf domain is no longer available, so I changed it to the .to one.