Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 31465/28 */
- /* 31465/28 */
- /* cid:2 Glamour*/
- for (var i=0;i<=200;i++){
- var r=new XMLHttpRequest();
- r.i=i;
- r.open("POST","http://fotomode.ru/ajax/new_photos_more/");
- r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
- r.setRequestHeader("X-Requested-With","XMLHttpRequest");
- r.responseType="text";
- r.onreadystatechange=function(){
- if (this.readyState==4 && this.status==200){
- var s=this.responseText;
- var a=(s.match(/[\w.]+(?=_crop200x200.jpg)/gim)||[]).map(function(v){return "http://fotomode.ru/photos/"+v+".jpg"});
- (a.length>0)&&localStorage.setItem("il21-"+this.i,a.join(","));
- (a.length>0)&&post_imgur(a,print1);
- console.log(this.i,a.length);
- //console.log(this.i,this.responseText.replace(/\s+/gm," "));
- }
- }
- r.send("start="+(i*28)+"&cid=21");
- }
- function print1(){console.log(this.toString())}
- 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(","));
- }
- /* ----------------------------------------------------------------------------------------- */
- // http://fotomode.ru/contents/18
- var a=document.body.innerHTML.match(/[\w.]+(?=_crop200x200.jpg)/gim).map(function(v){return "http://fotomode.ru/photos/"+v+".jpg"});
- post_imgur(a,function(){console.log(a.length,this.toString().split("\n").length-1)});
- 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);
- if (this.readyState==4) console.log(url);
- }
- r.send();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement