From c487dfeff58ae56390e596533df31396209e20b9 Mon Sep 17 00:00:00 2001 From: kanasimi Date: Sun, 19 Jul 2020 05:03:00 +0800 Subject: [PATCH] v2.9.0 --- novel.cmn-Hans-CN/qidian.js | 2 +- package.json | 2 +- work_crawler.updater.js | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/novel.cmn-Hans-CN/qidian.js b/novel.cmn-Hans-CN/qidian.js index a2bdf0c8..9b45649c 100644 --- a/novel.cmn-Hans-CN/qidian.js +++ b/novel.cmn-Hans-CN/qidian.js @@ -41,7 +41,7 @@ var crawler = new CeL.work_crawler({ while ((text = get_next_between()) !== undefined) { // 從URL網址中解析出作品id。 var matched = text.match( - // + // /]*?href="[^<>"]+?\/(\d+)"[^<>]*>(.+?)<\/a>/); id_list.push(matched[1]); id_data.push(get_label(matched[2])); diff --git a/package.json b/package.json index 4e503298..f304afd0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name" : "work_crawler", "title" : "CeJS online novels and comics downloader", - "version" : "v2.8.0", + "version" : "v2.9.0", "description" : "A tool using CeJS library to download online novels / comics.", "keywords" : [ "comic-downloader", "novel-downloader", "cejs", "downloader", "download-comic", "epub", "ebook", "comics", diff --git a/work_crawler.updater.js b/work_crawler.updater.js index 86201af9..4c463a59 100644 --- a/work_crawler.updater.js +++ b/work_crawler.updater.js @@ -55,7 +55,8 @@ function fetch_url(url, callback) { // network error? // console.error(e); throw e; - callback(null, e); + if (typeof callback === 'function') + callback(null, e); }); } @@ -82,7 +83,7 @@ function download_update_tool(update_script_url, callback) { // ---------------------------------------------------------------------------- -download_update_tool(update_script_url, function(update_script_name) { +download_update_tool(update_script_url, function(update_script_name, error) { update_CeJS(update_script_name, update_finished); });