Advertisement
rg443

mobilmusic -> imgur

Mar 29th, 2013
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var stack=0,i2=4698,tag="1920x1200";
  2. i2=1890,tag="1920x1200";
  3. //for (var i=0;i<=i2;i+=18){stack++;setTimeout(get_url,i*100,"http://www.mobilmusic.ru/newwallpaper.php?raz="+tag+"&start="+i, callback1);}
  4. for (var i=0;i<=78500;i+=18){stack++;setTimeout(get_url,i*100,"http://www.mobilmusic.ru/newwallpaper.php?start="+i, callback1);}
  5.  
  6.  
  7. function callback1() {
  8.   var a = this.toString().match(/http:\/\/\S+\/\d+(?=-80.jpg)/gim).map(function(v){return v+".jpg" });
  9.  
  10.   console.log(a.join("\n"));
  11.   post_imgur(a, function() {
  12.     console.log("imgur: " + (this.split("\n").length - 1), --stack);
  13.     window.hl = this.toString()
  14.   })
  15. }
  16. ;
  17.  
  18.  
  19. /* upload imgur */
  20. function post_imgur(a,callback) {    
  21. var r=new XMLHttpRequest();
  22. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  23. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  24. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  25. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
  26. r.send("u=" + a.join(","));
  27. }
  28.  
  29. /* fetch url */
  30. function get_url(url,callback) {
  31.     var r=new XMLHttpRequest();
  32.     r.open("GET",url,true);
  33.     r.onreadystatechange=function(){
  34.        if (this.readyState==4 && this.status==200) callback.call(this.responseText);
  35.        }
  36.     r.send();      
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement