Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function download() {
- xidel "$1" -f "css('div.main-image a')" --download '{$host}/'
- }
- function last_page() {
- xidel "$1" --extract "css('div.nav-links span.dots + a')"
- }
- url=$1
- page=$(last_page "$url")
- echo "Downloading pages 1 to $page of '$url'."
- download "$url"
- for i in $(seq 2 $page) ; do
- download "$url/$i"
- done
Advertisement
Add Comment
Please, Sign In to add comment