Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* http://www.artleo.com/mostdownloads/page/35/ */
- //var x=["winter",87];
- // var x=["mostdownloads",303];
- var s="animals 516";
- /*
- mostdownloads 324
- girls 869
- beautiful 61
- natural 372
- macro 55
- flowers 118
- food 167
- interior 61
- people 18
- aviation 28
- space 59
- newyear 43
- sport 37
- ships 14
- kids 36
- minimalize 47
- gun 43
- auto 207
- bikes 13
- towns 95
- animals 516
- spring 6
- summer 29
- autumn 31
- winter 87
- */
- var stack=0,x=s.match(/^(\w+) (\d+)$/); var stack=0;
- for (var i=parseInt(x[2]);i;i--)
- stack++&&get_url("http://www.artleo.com/"+x[1]+"/page/"+i+"/", function() {
- var a=this.match(/\d+\/\d+\.jpg/gim).join("\n").replace(/(\d+)\/(\d+)/gim,"http://www.artleo.com/images/$1/artleo.com_$2").split("\n");
- a && a.forEach(function(v,i,a) {a[i]=unescape(v).replace(/^(.*?url=)(.*)$/,"$2").replace(/http:\/\/i0.wp.com\//,"http://"); });
- //console.log(a.join("\n"));
- post_imgur(a,function(){
- console.log("imgur: "+ this.split("\n").length,--stack);
- window.hl=this.toString();
- //console.log(this.toString());
- });
- });
- /* upload imgur */
- 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.call(this.responseText); }
- r.send("u=" + a.join(","));
- }
- /* fetch url */
- function get_url(url,callback) {
- var r=new XMLHttpRequest();
- r.open("GET",url,true);
- r.onreadystatechange=function(){
- if (this.readyState==4 && this.status==200) callback.call(this.responseText);
- }
- r.send();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement