From c25eb6d213d473bf0966676b2561032e9c17612a Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 8 May 2019 21:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=93=E5=8F=96=E8=9B=8B=E8=9B=8B=E8=B5=9E?= =?UTF-8?q?=E7=BD=91=E7=AB=99=E5=89=8D=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.js | 4 ++-- src/sites/dandanzan.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app.js b/src/app.js index bfbdbef..98889ac 100644 --- a/src/app.js +++ b/src/app.js @@ -24,8 +24,8 @@ db.once('open', function () { // book.run(); // movie.run(); // bookChapter.run(); - // dandanzan.run(); - proxy.run(); + dandanzan.run(); + // proxy.run(); }); mongoose.connect(config.db, {promiseLibrary: Promise, useNewUrlParser: true}); diff --git a/src/sites/dandanzan.js b/src/sites/dandanzan.js index d0240af..c72a457 100644 --- a/src/sites/dandanzan.js +++ b/src/sites/dandanzan.js @@ -3,6 +3,7 @@ import cheerio from "cheerio"; import stringUtil from '../utils/string.util'; import Movie from '../models/Movies'; import generalQueue from '../utils/general.queue'; +import proxy from './proxy'; const URL_BASE = 'https://www.dandanzan.com' const maxIdx = 100000; @@ -145,6 +146,7 @@ const parseAllMovie = async (category) => { export default { run: async () => { + await proxy.run(); await parseAllMovie('movie'); await parseAllMovie('tv'); await parseAllMovie('show');