From 1e71e286598641884666371f71247131ae37fb0b Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Mon, 5 Jul 2021 18:00:17 +0200 Subject: [PATCH] add bin --- fish/.config/fish/functions/p-xnxx-all.fish | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 fish/.config/fish/functions/p-xnxx-all.fish diff --git a/fish/.config/fish/functions/p-xnxx-all.fish b/fish/.config/fish/functions/p-xnxx-all.fish new file mode 100644 index 0000000..23bd69b --- /dev/null +++ b/fish/.config/fish/functions/p-xnxx-all.fish @@ -0,0 +1,22 @@ +# Defined in /tmp/fish.ib9W00/p-xnxx-all.fish @ line 2 +function p-xnxx-all + set -l search $argv[1] + set -l page $argv[2] + + if test -z "$search" + echo "ERROR: no search given" + exit 3 + end + + if test -z "page" + set -l page 0 + end + + wget -O - "https://www.xnxx.com/search/gay/$search/$page" \ + | sed -e 's:>:>\n:g' \ + | grep 'a href="/video-' \ + | sed -e 's:.*href="\([^"]\+\)".*:https\://www.xnxx.com\1:' \ + | uniq > /tmp/mpv-playlist + mpv --playlist=/tmp/mpv-playlist --autofit=50%x50% + +end