Ratelimits... :-(, fixed extra download
This commit is contained in:
parent
58763f5bf3
commit
7c1ff29270
|
@ -19,12 +19,12 @@ function getnhentai {
|
|||
local types=($(print $pageinfo | jq -r '.types[]'))
|
||||
local num_pages=$(print $pageinfo | jq '.pages')
|
||||
local urls=()
|
||||
for i in {0..$num_pages}; do
|
||||
local itoc=$(($i + 1))
|
||||
[[ ${types[$i]} == p ]] && local type=png || local type=jpg
|
||||
urls+=("https://i.nhentai.net/galleries/$media_id/$itoc.$type")
|
||||
for i in {1..$num_pages}; do
|
||||
local ctoi=$(($i - 1))
|
||||
[[ ${types[$ctoi]} == p ]] && local type=png || local type=jpg
|
||||
urls+=("https://i.nhentai.net/galleries/$media_id/$i.$type")
|
||||
done
|
||||
curl -\#ZL --remote-name-all ${urls}
|
||||
curl --retry 10 -\#L --remote-name-all ${urls}
|
||||
for i in *; do
|
||||
local sortname="$(printf "%.3i" "${i%%.*}").${i##*.}"
|
||||
[ $sortname = $i ] || mv $i $sortname
|
||||
|
|
Loading…
Reference in New Issue