Guest User

cuteladypic.sh

a guest
Sep 11th, 2021
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function download() {
  4.   xidel "$1" -f "css('div.main-image a')" --download '{$host}/'
  5. }
  6.  
  7. function last_page() {
  8.   xidel "$1" --extract "css('div.nav-links span.dots + a')"
  9. }
  10.  
  11. url=$1
  12. page=$(last_page "$url")
  13.  
  14. echo "Downloading pages 1 to $page of '$url'."
  15.  
  16. download "$url"
  17. for i in $(seq 2 $page) ; do
  18.   download "$url/$i"
  19. done
  20.  
Advertisement
Add Comment
Please, Sign In to add comment