Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tmp=location.href.match(/^\S+\b(\d+)\S*/),url=tmp[0].replace(tmp[1],"$i"),i2=parseInt(tmp[1]);
- var arr=[];
- for (var i=i2,j=0;i>0;i--,j+=500) setTimeout(function(i){
- var r=new XMLHttpRequest();
- r.open("GET",url.replace("$i",i),true);
- r.i=i;
- r.t1=new Date();
- r.onload=function(){
- var a=this.response.match(/http[^=]+jpg/gim)||[];a=a.map(function(v){return v.replace(/-\d+x\d+/,"");});
- console.log(a.join("\n"),this.i,a.length);
- a.length&&post_imgur(a,function(){console.log(i,(new Date()-r.t1)+"ms");});
- arr=arr.concat(a);
- }
- r.send();
- },j,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.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(","));
- }
- /*
- http://www.travelwalls.net/page/336/
- http://500px.com/rhophotos?nolayout=true&page=17
- var a=this.response.match(/\/\d+\/\S+\/(?=3\.jpg)/gim)||[];a=a.map(function(v){return "http://pcdn.500px.net"+v+"5.jpg"});
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement