Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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();
- }
- 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(","));
- }
- /* downloads ratings all fullscreen widescreen
- w: 1280x720 1280x800 1440x900 1680x1050 1920x1080 1920x1200 2560x1440 2560x1600
- f: 1024x768 1152x864 1280x960 1280x1024 1400x1050 1600x1200
- a: 320x480 640x960 640x1136 1024x1024 2048x2048
- */
- for(var i=1,q=0;i<=2805;i++,q++) get_url("http://wallpaperscraft.com/all/downloads/widescreen/1920x1200/page"+i,function(){
- var a= this.toString().match(/http:\S+_preview\.jpg/gim).map(function(v){return v.replace("_preview.jpg","_1920x1200.jpg")});
- a&&console.log(q--,a.length);
- post_imgur(a,function(){});
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement