Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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(","));
- }
- function get_url(url,callback) {
- var r=new XMLHttpRequest();
- r.open("GET",url,true);
- //r.setRequestHeader("X-Requested-With", "XMLHttpRequest");
- //r.setRequestHeader("Accept-Encoding", "gzip");
- r.onreadystatechange=function(){
- if (this.readyState==4 && this.status==200 && callback) callback.call(this.responseText);
- }
- r.send();
- }
- /*
- 2560x1600 148
- 1920x1200 381
- 1920x1080 47
- 1600x900 61
- 1600x1200 829
- */
- var stack=0;
- for (var i=1;i<=829;i++)get_url("http://desktopia.net/resolution/1600x1200/page/"+i+"/", function(){
- var s=this.toString();
- //http://desktopia.net/download/house-near-the-beach-painting-desktop-wallpaper.jpg
- var a=document.body.innerHTML.match(/thumbs\/.*?(?=-\d+x\d+\.jpg)/gim).map(function(v){return v.replace("thumbs/","http://desktopia.net/download/")+"-desktop-wallpaper-1600x900.jpg" });
- stack++;
- post_imgur(a,function(){console.log(this.toString(),--stack)});a;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement