Advertisement
Guest User

posterous snarf.sh

a guest
Feb 15th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # Sample use, runs 100 curls at a time, downloading range 1 to 2 million
  4. # for chunk in $(seq 100 199); do ./snarf $chunk &; done
  5.  
  6. chunk="$1"
  7. for s in $(seq ${chunk}0000 ${chunk}9999); do
  8. if [ ! -e site.$s ]; then
  9. echo $s
  10. curl -H "X-Requested-With: XMLHttpRequest" -H "X-Xhrsource: posterous" -X GET -H "Cookie: _sharebymail_session_id=e55e807375f457efa9a22e091c0685c7; email=bugmenot%40trash-mail.com; _plogin=Veritas; logged_in_before=true" http://posterous.com/api/2/sites/$s > site.$s
  11. fi
  12. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement