Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // http://www.pixoto.com/images-photography/all/all/leading/in-week-30-2013?mature=true
- var a=document.body.innerHTML.match(/http:\/\/lh\d+.ggpht.com\/\S+(?==s270-c)/gim).map(function(v){return v.replace(/\/lh\d\./,"/lh3.")+"=s0"});
- post_imgur(a,function(){console.log("done.");});
- function post_imgur(a,callback) {
- var r=new XMLHttpRequest();
- r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=&x=",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.call(this.responseText); }
- r.send("u=" + a.join(","));
- }
- /* bulk upload */
- for (var i=0,j=0,k=0;i<10000;i++) setTimeout(function(i){
- j++;
- var r=new XMLHttpRequest();
- r.open("GET","http://www.pixoto.com/images-photography/all/all/leading/in-all?json=true&offset="+(i*100)+"&limit=100&mature=true",true);
- r.i=i;
- r.onload=function(){
- var a=[];
- j--;
- if (this.status!=200) {
- console.log("failed:",this.i,this.status,this.readyState,this.getAllResponseHeaders());return;
- }
- var d=JSON.parse(this.response);
- console.log("page:",this.i,j);
- for (var i=0;i<d.list.length;i++) a.push(d.list[i].url.replace(/lh\d+.ggpht.com/,"lh3.ggpht.com")+"=s0");
- k++;post_imgur(a,function(){console.log("imgur:",--k);});
- }
- r.send();
- },i*500+j*500,i);
- function post_imgur(a,callback) {
- var r=new XMLHttpRequest();
- r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=&x=",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.call(this.responseText); }
- r.send("u=" + a.join(","));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement