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(","));
- }
- /*
- var a= document.body.innerHTML.match(/http:\S+\.jpg/gim).map(function(v){return v.replace(/-\d+x\d+/,"")});
- post_imgur(a);
- */
- // love funny inspirational famous life cute best motivational friendship birthday happiness positive brainy movie
- var tag="movie",i2=2;
- for(var i=1,q=0;i<=693;i++,q++) get_url("http://favimages.net/page/"+i+"/",function(){
- // for(var i=1,q=0;i<=i2;i++,q++) get_url("http://favimages.net/tag/"+tag+"/page/"+i+"/",function(){
- var a= document.body.innerHTML.match(/http:\S+\.jpg/gim).map(function(v){return v.replace(/-\d+x\d+/,"")});
- a&&console.log(q--,a.length);
- post_imgur(a);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement