rg443

artfreelance.me images page 1 ... 227

Jan 1st, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* artfreelance.me */
  2. for (var i=227;i;i--)
  3. get_url("http://artfreelance.me/page/"+i+"/", function() {
  4.    var a=this.match(/http[^\s]*?\.jpg/gim);  
  5.    a && a.forEach(function(v,i,a) {a[i]=unescape(v).replace(/^(.*?url=)(.*)$/,"$2").replace(/http:\/\/i0.wp.com\//,"http://"); });
  6.    //console.log(a.join("\n"));
  7.    post_imgur(a,function(){
  8.       console.log("imgur: "+ this.split("\n").length);
  9.       window.hl=this.toString();
  10.       console.log(this.toString());
  11.    });
  12. });
  13.  
  14.  
  15. /* upload imgur */
  16. function post_imgur(a,callback) {    
  17. var r=new XMLHttpRequest();
  18. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  19. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  20. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  21. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
  22. r.send("u=" + a.join(","));
  23. }
  24.  
  25. /* fetch url */
  26. function get_url(url,callback) {
  27.     var r=new XMLHttpRequest();
  28.     r.open("GET",url,true);
  29.     r.onreadystatechange=function(){
  30.        if (this.readyState==4 && this.status==200) callback.call(this.responseText);
  31.        }
  32.     r.send();      
  33.  
  34. }
Add Comment
Please, Sign In to add comment