Advertisement
rg443

hqoboi.com -> imgur

May 4th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // http://www.hqoboi.com/eng/links_sitemap.html
  2. for(var i=0,b=[],ul=document.links;i<ul.length;i++)(/eng/.test(ul[i].href) && (setTimeout(get_url,i*100,ul[i].href,parse1)))
  3.  
  4. function parse1(){
  5. var a=unique1(this.toString().match(/\w+\/\w+.jpg/gim).map(function(v,i){return 'http://www.hqoboi.com/img/' + v.replace("_/","/")})).sort();
  6. console.log(a.join("\n"),a.length);
  7. post_imgur(a,print1);
  8. }
  9.  
  10.  
  11. function print1(){console.log(this.toString().split("\n").length-1)}
  12. function unique1(a){for(var c=Object.create(null),d=[],b=a.length;b--;)c[a[b]]||(c[a[b]]=!0,d.push(a[b]));return d};
  13.  
  14. function post_imgur(a,callback) {        
  15. var r=new XMLHttpRequest();
  16. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  17. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  18. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  19. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
  20. r.send("u=" + a.join(","));
  21. }
  22. function get_url(url,callback) {
  23.         var r=new XMLHttpRequest();
  24.         r.open("GET",url,true);
  25.         //r.setRequestHeader("X-Requested-With", "XMLHttpRequest");
  26.         //r.setRequestHeader("Accept-Encoding", "gzip");
  27.         r.onreadystatechange=function(){
  28.        if (this.readyState==4 && this.status==200 && callback) callback.call(this.responseText);
  29.        }
  30.     r.send();      
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement