dev.js 657 Bytes
const priceTask = require('./tasks/price-task');
const spider = require('./libs/spider');

// priceTask();


spider.spiderFetch(20, 'https://du.hupu.com/mapi/product/lastSoldList', {
  lastId: 0
}).then(result => {
  if (result.status === 200) {
    console.log(result.data.lastId);
    result.data.list.forEach(item => {
      console.log(item.item.size, item.formatTime)
    })
  }
  spider.spiderFetch(20, 'https://du.hupu.com/mapi/product/lastSoldList', {
    lastId: 1545779997
  }).then(result => {
    if (result.status === 200) {
      result.data.list.forEach(item => {
        console.log(item.item.size, item.formatTime)
      })
    }
  });
});