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(","));
- }
- function fetch_vc(tag,i2){
- var queue1=0,queue2=0;
- for (var i=1;i<=i2;i++) queue1++&&get_url("http://view.stern.de/de/"+tag+"/?page="+i,function(){
- queue1--;
- var a=this.toString().match(/http:\/\/view\S*\/picture\/\S*\.jpg/gim).map(function(v){var x=v.match(/(\d+\/.*)-\d+\.jpg/);return "http://view.stern.de/de/original/"+ x[1]+".jpg";});
- console.log(tag,queue1,a.length);
- //console.log(a.join("\n"));
- queue2++;
- if (true) post_imgur(a,function(){
- queue2--;
- console.log("imgur",queue2,this.toString().split("\n").length-1);
- });
- });
- }
- /*
- gallery/1
- 0 563
- 1 118
- 2 145
- 3 135
- 4 117
- 5 117
- 6 175
- 7 190
- 8 70
- 9 121
- 10 102
- 11 89
- 12 86
- 13 111
- category/1
- 1 1548
- 13 2597
- */
- //fetch_vc("category/13",2597);
- //fetch_vc("gallery/13",111);
- fetch_vc("topimages/0",563)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement