Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var page=2,page_size=20;
- var data1=document.createElement("div");document.body.innerHTML="";document.body.appendChild(data1);
- for (var i=(page-1)*page_size+1;i<=page*page_size;i++){
- var r=new XMLHttpRequest();r.open("GET","http://users1.jabry.com/rg443/f5i.asp?q=rg443/favorites&p="+i);
- r.i=i;
- r.onreadystatechange=function(){
- if (this.readyState!=4 || this.status!=200) return;
- var s=this.responseText.match(/(http.*.jpg)/gim).join("\n").replace(/(http:\/\/pcdn.500px.net\/)(.*.jpg)/gim,'<img src="http://127.0.0.'+ (~~(Math.random()*10)+1)+'/5x/$2" alt="500px" width="280" height="280"/>');
- setTimeout(function(){data1.insertAdjacentHTML("beforeEnd",s)},50);
- console.log(this.i,(""+this.responseText).split("\n").length);
- post_imgur(this.responseText.match(/(http.*.jpg)/gim).join("\n").replace(/\/3.jpg/gim,"/4.jpg").match(/(http.*.jpg)/gim),function(){console.log("imgur: " +this.toString().split("\n").length)});
- }
- r.send();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement