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();
- }
- /*
- 276785 wallpapers
- http://wall.alphacoders.com/highest_rated.php?page=1 .. 9227
- http://wall.alphacoders.com/newest_wallpapers.php?page=1
- http://wall.alphacoders.com/popular.php?page=84
- http://wall.alphacoders.com/by_resolution.php?w=1920&h=1200&page=2056
- http://wall.alphacoders.com/?s=Food&page=151
- http://wall.alphacoders.com/by_sub_category.php?id=168646&page=46 # Landscape
- */
- var stack=0;
- for (var i=1;i<=789;i++)setTimeout(get_url,i*20,"http://wall.alphacoders.com/?s=Earth&page=151"+i, callback1);
- function callback1(){
- var a=this.toString().match(/http:\/\/images\d+.alphacoders.com\/\S+.jpg/gim).map(function(v){return v.replace(/\/(thumbbig|thumb)-/,"/")});
- stack++;
- post_imgur(a,function(){console.log(this.toString().split("\n").length-1,--stack)});
- // console.log(a.join("\n"));
- }
- /*
- Animal 660
- Earth 790
- Food 152
- Holiday 87
- Man%20Made 412
- Men 10
- Military 216
- Misc 68
- Multi%20Monitor 51
- Photography 364
- Products 18
- Religious 26
- Sports 64
- Technology 72
- Vehicles 971
- Women 318
- http://wall.alphacoders.com/wallpaper_categories.php?s=Animal
- http://wall.alphacoders.com/wallpaper_categories.php?category_id=2&page=11
- http://wall.alphacoders.com/wallpaper_categories.php?s=Man%20Made
- http://wall.alphacoders.com/wallpaper_categories.php?category_id=16&page=11
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement