Advertisement
rg443

nature portraits popular images - post imgur

Jan 26th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //document.body.innerHTML.match(/\w+.jpg/gim).map(function(v){return "http://www.natur-portrait.de/images/upload/orig/"+v});
  2. //http://www.natur-portrait.de/fotografen.php?letter=
  3. // tag: 1 popular, 2 new, 3 views, 4 rating, 5 upcoming (actual popular)
  4.  
  5. for (var tag=5,i=2500,stack=0,pages={};i;i--){
  6.    var r=new XMLHttpRequest();
  7.    r.open("GET","http://www.natur-portrait.de/alle-"+i+"-"+tag+"-fotos.html");
  8.    r.onreadystatechange=function(){
  9.       if (this.readyState==4 && this.status==200) {
  10.           var a=this.responseText.match(/\w+.jpg/gim).slice(0,-4);
  11.           console.log(this.page,--stack,a);
  12.           post_imgur (a.map(function(v){return "http://www.natur-portrait.de/images/upload/orig/"+v}),function(){});
  13.           pages[this.page]=a;
  14.           }
  15.       }
  16.    stack++;
  17.    r.page=i,r.tag=tag,r.t1=new Date();
  18.    r.send();
  19.    }
  20. pages["key"]="np",pages["title"]="nature portraits";pages["tag"]=tag,pages["t1"]=new Date();
  21.  
  22. /* upload imgur */
  23. function post_imgur(a,callback) {        
  24. var r=new XMLHttpRequest();
  25. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  26. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  27. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  28. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
  29. r.send("u=" + a.join(","));
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement