diff --git a/fish/.config/fish/functions/p-xhamster-getpdl.fish b/fish/.config/fish/functions/p-xhamster-getpdl.fish new file mode 100644 index 0000000..d3bc226 --- /dev/null +++ b/fish/.config/fish/functions/p-xhamster-getpdl.fish @@ -0,0 +1,6 @@ +function p-xhamster-getpdl + p-xhamster-list https://fr.xhamster.com/users/piwafuwoz/favorites/videos/611e372b05295713901598a3-collection \ + | tac \ + | tee /dev/stderr \ + | pdl --batch-file - +end diff --git a/fish/.config/fish/functions/p-xhamster-list.fish b/fish/.config/fish/functions/p-xhamster-list.fish new file mode 100644 index 0000000..8cd350e --- /dev/null +++ b/fish/.config/fish/functions/p-xhamster-list.fish @@ -0,0 +1,28 @@ +function p-xhamster-list + set -l url $argv[1] + set -l page 1 + set -l links + set -l count 1 + + if test -z "$url" + echo "ERROR: no URL given" + return 3 + end + + while test $count -gt 0 + echo -n "Getting page $page: " >&2 + set -l pagelinks (wget -O - "$url/$page" 2>/dev/null \ + | sed "s:>:>\n:g" \ + | grep "&2 + set -a links $pagelinks + set page (math $page + 1) + end + + echo -e (string join "\n" $links) + +end diff --git a/fish/.config/fish/functions/p-xnxx-all.fish b/fish/.config/fish/functions/p-xnxx-all.fish index 23bd69b..cad8d54 100644 --- a/fish/.config/fish/functions/p-xnxx-all.fish +++ b/fish/.config/fish/functions/p-xnxx-all.fish @@ -1,11 +1,10 @@ -# 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 + return 3 end if test -z "page"