Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.68 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. PAGE=0
  4. while true
  5. do
  6.   ((PAGE++))
  7.   #pull the search results and get a list of urls
  8.   wget -O search "https://e621.net/post/index/$PAGE/$1"
  9.   if grep -q "No posts matched your search." search
  10.   then
  11.     break
  12.   fi
  13.   for x in `grep tooltip-thumb search | sed "s/.*href='\([^']*\)'.*/\1/"`
  14.   do
  15.     #now grab the next page, and the image therein
  16.     wget -O result "https://e621.net$x"
  17.     wget -O img $(grep Size result | sed "s/.*href=\"\([^\"]*\)\".*/\1/")
  18.     #kill feh then reopen a new one inside a subshell so we can kill it again
  19.     kill $!
  20.     sleep 0.1
  21.     (feh -F img)&
  22.     #hold on i gotta jerk
  23.     sleep 10
  24.   done
  25. done
  26. #make sure feh is kill
  27. kill $!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement