fix(fish) fixes misc functions
This commit is contained in:
parent
115bfcd352
commit
8faeef3a94
3 changed files with 2 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
function p-xhamster-getpdl
|
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 \
|
| tac \
|
||||||
| tee /dev/stderr \
|
| tee /dev/stderr \
|
||||||
| pdl --batch-file -
|
| pdl --batch-file -
|
||||||
|
|
|
@ -14,7 +14,7 @@ function p-xhamster-list
|
||||||
set -l pagelinks (wget -O - "$url/$page" 2>/dev/null \
|
set -l pagelinks (wget -O - "$url/$page" 2>/dev/null \
|
||||||
| sed "s:>:>\n:g" \
|
| sed "s:>:>\n:g" \
|
||||||
| grep "<a" \
|
| grep "<a" \
|
||||||
| sed -n 's|.*\(https://fr.xhamster.com/videos/[^"]\+\).*|\1|p' \
|
| sed -n 's|.*\(https://xhamster.com/videos/[^"]\+\).*|\1|p' \
|
||||||
| uniq | string split ' ')
|
| uniq | string split ' ')
|
||||||
|
|
||||||
set count (count $pagelinks)
|
set count (count $pagelinks)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# Defined in /tmp/fish.HQIyJ6/ydl.fish @ line 2
|
|
||||||
function ydl
|
function ydl
|
||||||
set -l addargs --extract-audio --keep-video
|
set -l addargs --extract-audio --keep-video
|
||||||
set -l url $argv[1]
|
set -l url $argv[1]
|
||||||
|
@ -6,13 +5,11 @@ function ydl
|
||||||
echo "args = $argv[1] -- $argv[2]"
|
echo "args = $argv[1] -- $argv[2]"
|
||||||
|
|
||||||
if contains -- "-a" $argv
|
if contains -- "-a" $argv
|
||||||
echo "has -a"
|
|
||||||
set addargs "--extract-audio"
|
set addargs "--extract-audio"
|
||||||
set url $argv[2]
|
set url $argv[2]
|
||||||
end
|
end
|
||||||
|
|
||||||
if contains -- "-v" $argv
|
if contains -- "-v" $argv
|
||||||
echo "has -v"
|
|
||||||
set -e addargs
|
set -e addargs
|
||||||
set url $argv[2]
|
set url $argv[2]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue