Advertisement
rg443

wall.alphacoders.com -> imgur

Mar 17th, 2013
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function post_imgur(a,callback) {        
  2. var r=new XMLHttpRequest();
  3. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  4. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  5. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  6. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
  7. r.send("u=" + a.join(","));
  8. }
  9. function get_url(url,callback) {
  10.         var r=new XMLHttpRequest();
  11.         r.open("GET",url,true);
  12.         //r.setRequestHeader("X-Requested-With", "XMLHttpRequest");
  13.         //r.setRequestHeader("Accept-Encoding", "gzip");
  14.         r.onreadystatechange=function(){
  15.        if (this.readyState==4 && this.status==200 && callback) callback.call(this.responseText);
  16.        }
  17.     r.send();      
  18.  
  19. }
  20.  
  21.  
  22. var stack=0;
  23. /*
  24. Man Made 396,
  25. */
  26.  
  27. for (var i=1;i<=143;i++)get_url("http://wall.alphacoders.com/?s=Food&page="+i, function(){
  28. //for (var i=1;i<=396;i++)get_url("http://wall.alphacoders.com/?s=Man Made&page="+i, function(){
  29. //for (var i=1;i<=4;i++)get_url("http://wall.alphacoders.com/by_sub_category.php?id=160340&page="+i, function(){
  30. //for (var i=1;i<=122;i++)get_url("http://wall.alphacoders.com/index.php?page="+i, function(){
  31.    var a=this.toString().match(/http:\/\/images\d+.alphacoders.com\/\S+.jpg/gim).map(function(v){return v.replace(/\/(thumbbig|thumb)-/,"/")});
  32.    stack++;
  33.    post_imgur(a,function(){console.log(this.toString(),--stack)});console.log(a.join("\n"));
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement