Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- PAGE=0
- while true
- do
- ((PAGE++))
- #pull the search results and get a list of urls
- wget -O search "https://e621.net/post/index/$PAGE/$1"
- if grep -q "No posts matched your search." search
- then
- break
- fi
- for x in `grep tooltip-thumb search | sed "s/.*href='\([^']*\)'.*/\1/"`
- do
- #now grab the next page, and the image therein
- wget -O result "https://e621.net$x"
- wget -O img $(grep Size result | sed "s/.*href=\"\([^\"]*\)\".*/\1/")
- #kill feh then reopen a new one inside a subshell so we can kill it again
- kill $!
- sleep 0.1
- (feh -F img)&
- #hold on i gotta jerk
- sleep 10
- done
- done
- #make sure feh is kill
- kill $!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement