summaryrefslogtreecommitdiffstats
path: root/.local/bin/notflix
blob: 24598a7d1bb72a72d23322754b7747ac4420243a (plain) (blame)
1
2
3
4
5
6
#!/bin/sh

query="$(echo $1 | sed 's/ /+/g')"
movie=$(curl -s https://1337x.wtf/search/$query/1/ | grep -Eo "torrent\/[0-9]{7}\/[a-zA-Z0-9./?=_%:-]*" |head -n 1)
magnet=$(curl -s https://1337x.wtf/$movie | grep -Po "magnet:\?xt=urn:btih:[a-zA-Z0-9]*" | head -n 1)
peerflix -k $magnet