summaryrefslogtreecommitdiff
path: root/bin/extra/1xsearch
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-30 08:23:45 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-08-30 08:23:45 +0200
commit3f8594ee04d2a3d9b40a259daf3b564a53b510fa (patch)
tree66ed50643cdc81af813b5771a99732d0f78bb618 /bin/extra/1xsearch
parent45d39ae0c67bb086f4df0c366b251e06c888408d (diff)
parent333aaf38c66a1e4ba41d3acea38b21613c0075b2 (diff)
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/extra/1xsearch')
-rwxr-xr-xbin/extra/1xsearch20
1 files changed, 0 insertions, 20 deletions
diff --git a/bin/extra/1xsearch b/bin/extra/1xsearch
deleted file mode 100755
index a248d38..0000000
--- a/bin/extra/1xsearch
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# dependencies
-which pup > /dev/null ||
- exit 1
-
-test -z "${query:=$1}" &&
- query="$(cat /dev/stdin)"
-
-url="https://1337x.to"
-query="$(echo "$query" | tr ' ' '+' )"
-result="$(curl -s "$url/search/$query/1/" |
- pup -p 'a attr{href}' |
- grep "^/torrent" |
- head -n 1)"
-# result contains / as first char
-curl -s "$url$result" |
- pup -p 'a attr{href}' |
- grep "^magnet:" |
- head -n 1