⎗ ✓ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28#!/bin/bash MAX=5 # change this to download more simultaneously [[ -z $@ ]] && { echo -n "Enter link: "; read sauce; } || sauce="$@" [[ -z $sauce ]] && { echo "[-] No links given."; exit 1; } for i in ${sauce[@]}; do if [[ ! $(curl -s -LI $i | head -1) =~ 200 ]]; then echo "[-] Wrong link :: $i"; continue; fi html=$(curl -s $i) title=$(echo $html | pup 'h1#title attr{title}') tmp=$(echo $html | pup 'p.title text{}') files=$(echo $tmp | awk '{print $1}') size=$(echo $tmp | awk '{print $2" "$3}') links=$(echo $html | pup 'a.image attr{href}' | sed 's/[[:space:]]/\%20/g') if [[ -d "$title" ]] && [[ ! -z $(ls -A "$title") ]]; then echo "Already Downloaded :: $title [$i]"; continue; fi printf "[*] Downloading :: [Album: $title :: $files :: $size]" && mkdir -p "$title" echo $links | sed 's/[[:space:]]/\n/g' | xargs -P $MAX -I{} aria2c -q -x 5 -d "$title" {} sleep 1 printf "\33[2K\r%s\n" "[+] Downloaded [Album: $title :: $files :: $size]" unset html title tmp files size links done