/**
 * Created by xianda on 15/7/10.
 */

var Pageres = require('pageres');
var qiniu = require('./qiniu');
var os = require('os');


exports.getImg = function(url, filename, selector, size) {
  var pageres = new Pageres({
    delay: 2,
    selector: selector,
    filename: filename
  }).src(url, [size])
    .dest(__dirname);

  return function(callback) {
    pageres.run(callback);
  };
};
@@ -35,16 +35,18 @@
 0.%0A */%0A%0A
+//
 var Page
@@ -67,24 +67,24 @@
 'pageres');%0A
-
 var qiniu = 
@@ -190,16 +190,18 @@
 ze) %7B%0A  
+//
 var page
@@ -222,16 +222,18 @@
 res(%7B%0A  
+//
   delay:
@@ -238,16 +238,18 @@
 y: 2,%0A  
+//
   select
@@ -264,16 +264,18 @@
 ctor,%0A  
+//
   filena
@@ -289,16 +289,18 @@
 ename%0A  
+//
 %7D).src(u
@@ -313,16 +313,18 @@
 ize%5D)%0A  
+//
   .dest(
@@ -335,19 +335,25 @@
 rname);%0A
+  //
 %0A  
+//
 return f
@@ -374,16 +374,18 @@
 ck) %7B%0A  
+//
   pagere
@@ -403,13 +403,15 @@
 ack);%0A  
+//
 %7D;%0A%7D;

add comment