Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* upload imgur */
- 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);
- }
- r.send();
- }
- Array.prototype.unique = function(){
- return this.filter(function(s, i, a){ return i == a.lastIndexOf(s); });
- }
- function folder1(val) {
- var r=160;
- val=parseInt(val);
- if (800000 <val) r=160;
- else if (795000 < val) r=159;
- else r=158;
- return r;
- }
- function folder2(val) {
- var i=160,j=800000;
- for (i=i;i;i--,j-=5000) {
- if (j<val) break;
- }
- return i;
- }
- var stack=0;for (var i=0;i<10;i++) get_url("http://naturfotografen-forum.de/ajax.php?action=indexscroll_do&limit=100&skip="+ (i*100),function(){
- var x=(this.match(/data-object_id='\d+'/gim)||[]).unique();
- x=x.join("\n").match(/\d+/gim);
- x.forEach(function(v,i,a){a[i]="http://naturfotografen-forum.de/data/o/" + folder2(v)+ "/" +v + "/image.jpg"});
- console.log(x.join("\n"));
- console.log(--stack,this.length,x.length)
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement