Guest User

Untitled

a guest
Jun 16th, 2011
215
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2.  
  3. import re;
  4. import urllib2;
  5. import os;
  6.  
  7. os.mkdir('vol1');
  8.  
  9. url = "http://afghanant.wordpress.com/2009/11/07/hiwainaru-fantasy-xiii-final-fantasy-xiii-lightning-hentai/";
  10. source = urllib2.urlopen(url).read();
  11. pattern = re.compile(r'(http://afghanant.files.wordpress.com/2009/10/[0-9]{2}\.jpg)', re.DOTALL);
  12. res = pattern.findall(source);
  13.  
  14. for item in res:
  15.     resp = urllib2.urlopen(item).read();
  16.     data = item.split('/');
  17.     f = open("./vol1/" + data[len(data)-1], 'w');
  18.     f.write(resp);
  19.     f.close();
  20.  
  21. os.mkdir('vol3');
  22.  
  23. base = "http://blog.hentaicircles.com/cache/Doujinshi/H/Hiwainaru%20Fantasy%20XIII%20Vol.%203/0";
  24. for i in range(1, 56):
  25.     if i < 10:
  26.         tmp = base + "0" + str(i) + "_1180.jpg"
  27.     else:
  28.         tmp = base + str(i) + "_1180.jpg"
  29.     f = open("./vol3/" + str(i) + ".jpg", 'w')
  30.     resp = urllib2.urlopen(tmp).read()
  31.     f.write(resp)
  32.     f.close()
RAW Paste Data