Advertisement
rg443

wordpress -> imgur

May 13th, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. 2644    wallpapersol.com
  3. 1490    foundwalls.com
  4. 1140     www.wallpapersshop.net
  5. 586 www.travelimg.org  
  6. 101 www.traveltop.net
  7. 125 www.architecturepics.org
  8. 744 www.new-wall.com
  9. 215 www.wallpapersmag.com
  10. 370 www.wallpaperax.com
  11. 487 www.wallpaperbe.com
  12. 444 www.walls-inc.net
  13. 809 wallpapersbest.net
  14. 414 wallpaperskd.com
  15. 852 www.skipwall.com
  16. 358 www.wallsforpc.com
  17. 637 wallpaperswiki.org
  18. 845 www.wall-online.net
  19. 910 www.wallsonline.org
  20. 217 www.inwallpapers.net
  21. 636 www.upphotos.net
  22. 378 it.my-walls.net
  23. 252 www.yapwallpapers.com
  24. 317 www.ifchina.net
  25. 19  hellpapers.com
  26. */
  27.  
  28.  
  29. var i2=19,tag="hellpapers.com",stack=0;
  30. //for (var i=1;i<=i2;i++){stack++;setTimeout(get_url,i*100,"http://"+tag+"/page/"+i, callback1);}
  31. for (var i=1;i<=i2;i++){stack++;setTimeout(get_url,i*100,"http://"+tag+"/?page="+i, callback1);}
  32.  
  33. function callback1() {
  34.   //var a = this.toString().match(/http:\/\/(www.ifchina.net)\/wp-content\/uploads\/\S*?\.jpe*g/gim).map(function(v){return v  });
  35.  var a = this.toString().match(/\/wallpapers\/\S*?\.jpe*g/gim).map(function(v){return "http://hellpapers.com"+v.replace("thumb_","")  });
  36.   console.log(a.join("\n"));
  37.  
  38.   post_imgur(a, function() {
  39.     console.log("imgur: " + (this.split("\n").length - 1), --stack);
  40.     window.hl = this.toString()
  41.   })
  42. }
  43. ;
  44.  
  45.  
  46. /* upload imgur */
  47. function post_imgur(a,callback) {    
  48. var r=new XMLHttpRequest();
  49. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  50. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  51. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  52. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
  53. r.send("u=" + a.join(","));
  54. }
  55.  
  56. /* fetch url */
  57. function get_url(url,callback) {
  58.     var r=new XMLHttpRequest();
  59.     r.open("GET",url,true);
  60.     r.onreadystatechange=function(){
  61.        if (this.readyState==4 && this.status==200) callback.call(this.responseText);
  62.        }
  63.     r.send();      
  64.  
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement