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