Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ez awarded photo gallery
- /*
- photos 501
- potw-gallery 19
- editors-choice-gallery 169
- highly-commended-gallery 501
- junior-gallery 501
- junior-award-gallery 36
- pano-gallery 190
- guest-editor-gallery 241
- readers-choice-gallery 501
- user-award-gallery 501
- foliopic-sale-gallery 33
- gallery/filter/landscape-travel-4743
- model-253
- nude-1483
- black-white-4734
- */
- for (var tag="photos",i=500,stack=0,pages={};i>=0;i--){
- var r=new XMLHttpRequest();
- r.open("GET","http://www.ephotozine.com/"+tag+"/p-"+i);
- r.onreadystatechange=function(){
- if (this.readyState==4 && this.status==200) {
- var a=this.responseText.match(/http:\/\/images.ephotozine.com\/gallery\/\d+\/\d+(\/tn\/tn|\/tn_med\/)\d+_\d+\.jpg/gim).map(function(v){return v.replace(/(\/tn\/tn|\/tn_med\/)/,"/lrg/lrg_")});
- console.log(this.page,--stack,a.length);
- post_imgur (a,function(){});
- pages[this.page]=a;
- }
- if (this.readyState==4 && this.status!=200) {stack--;"failed: " + this.page}
- }
- stack++;
- r.page=i,r.tag=tag,r.t1=new Date();
- r.send();
- }
- pages["key"]="ez",pages["title"]="ephotozine";pages["tag"]=tag,pages["t1"]=new Date();
- /* 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&&callback.call(this.responseText); }
- r.send("u=" + a.join(","));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement