fix(fish) fixes misc functions

This commit is contained in:
Bruno Carlin 2022-03-30 10:27:21 +02:00
parent 115bfcd352
commit 8faeef3a94
3 changed files with 2 additions and 5 deletions

View file

@ -1,5 +1,5 @@
function p-xhamster-getpdl
p-xhamster-list https://fr.xhamster.com/users/piwafuwoz/favorites/videos/611e372b05295713901598a3-collection \
p-xhamster-list https://xhamster.com/users/piwafuwoz/favorites/videos/611e372b05295713901598a3-collection \
| tac \
| tee /dev/stderr \
| pdl --batch-file -

View file

@ -14,7 +14,7 @@ function p-xhamster-list
set -l pagelinks (wget -O - "$url/$page" 2>/dev/null \
| sed "s:>:>\n:g" \
| grep "<a" \
| sed -n 's|.*\(https://fr.xhamster.com/videos/[^"]\+\).*|\1|p' \
| sed -n 's|.*\(https://xhamster.com/videos/[^"]\+\).*|\1|p' \
| uniq | string split ' ')
set count (count $pagelinks)

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.HQIyJ6/ydl.fish @ line 2
function ydl
set -l addargs --extract-audio --keep-video
set -l url $argv[1]
@ -6,13 +5,11 @@ function ydl
echo "args = $argv[1] -- $argv[2]"
if contains -- "-a" $argv
echo "has -a"
set addargs "--extract-audio"
set url $argv[2]
end
if contains -- "-v" $argv
echo "has -v"
set -e addargs
set url $argv[2]
end