#!/bin/bash data=$(curl -l "$1" | grep /d/) base=$(cut -d/ -f1-5 <<< "${1/v/d}") num=$(awk -F'[()]' '{print $4}' <<< "$data" | bc) name=$(cut -d/ -f5 <<< "$data") aria2c "$base/$num/$name"