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