mirror of
https://github.com/Phantop/dotfiles
synced 2025-12-08 12:58:18 +00:00
fish: use curl-impersonate instead of qtcurl for shub
This commit is contained in:
parent
db100df4df
commit
e957e2bf86
4
bin/shub
4
bin/shub
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/fish
|
#!/usr/bin/fish
|
||||||
set url $argv[1]
|
set url $argv[1]
|
||||||
|
|
||||||
set base (qtcurl $url)
|
set base (curli -b toc_show=999 $url)
|
||||||
|
|
||||||
set author (echo $base | pup .auth_name_fic text{})
|
set author (echo $base | pup .auth_name_fic text{})
|
||||||
set chaps (echo $base | pup .toc_a attr{href})
|
set chaps (echo $base | pup .toc_a attr{href})
|
||||||
|
|
@ -13,7 +13,7 @@ mkdir -- "$dir"
|
||||||
|
|
||||||
for i in $chaps
|
for i in $chaps
|
||||||
while true
|
while true
|
||||||
set page (qtcurl $i)
|
set page (curli $i)
|
||||||
if test -z "$page"
|
if test -z "$page"
|
||||||
echo "Invalid url: $i"
|
echo "Invalid url: $i"
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue