Advertisement
rg443

ephotozine awarded photo gallery, post imgur

Jan 26th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ez awarded photo gallery
  2. /*
  3. photos 501
  4. potw-gallery 19
  5. editors-choice-gallery 169
  6. highly-commended-gallery 501
  7. junior-gallery 501
  8. junior-award-gallery 36
  9. pano-gallery 190
  10. guest-editor-gallery 241
  11. readers-choice-gallery 501
  12. user-award-gallery 501
  13. foliopic-sale-gallery 33
  14.  
  15. gallery/filter/landscape-travel-4743
  16. model-253
  17. nude-1483
  18. black-white-4734
  19. */
  20. for (var tag="photos",i=500,stack=0,pages={};i>=0;i--){
  21.    var r=new XMLHttpRequest();
  22.    r.open("GET","http://www.ephotozine.com/"+tag+"/p-"+i);
  23.    r.onreadystatechange=function(){
  24.       if (this.readyState==4 && this.status==200) {
  25.           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_")});
  26.           console.log(this.page,--stack,a.length);
  27.           post_imgur (a,function(){});
  28.           pages[this.page]=a;
  29.           }
  30.       if (this.readyState==4 && this.status!=200) {stack--;"failed: " + this.page}
  31.       }
  32.    stack++;
  33.    r.page=i,r.tag=tag,r.t1=new Date();
  34.    r.send();
  35.    }
  36. pages["key"]="ez",pages["title"]="ephotozine";pages["tag"]=tag,pages["t1"]=new Date();
  37.  
  38. /* upload imgur */
  39. function post_imgur(a,callback) {        
  40. var r=new XMLHttpRequest();
  41. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  42. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  43. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  44. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
  45. r.send("u=" + a.join(","));
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement