Skip to content

Commit

Permalink
fix #227: 漫畫160網址更動, 網站架構改變
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Feb 22, 2019
1 parent 8518a48 commit 2a8eef1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion comic.cmn-Hans-CN/manhuagui.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ crawler = new CeL.work_crawler({
// 60s 大致OK
// 2019/2/6: 40s: NG, ban 1 day.
// 50s 在下載過50章後一樣會 ban。.5 day?
chapter_time_interval : '180s',
chapter_time_interval : '181s',

// 2018/3/3 已經不再有常常出現錯誤的情況。
// allow .jpg without EOI mark.
Expand Down
10 changes: 7 additions & 3 deletions comic.cmn-Hans-CN/mh160.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ var crawler = new CeL.work_crawler({
// one_by_one : true,

// 2018/6/4 6:34 最後一次成功存取 http://www.733mh.com/
// 之後更改域名
base_URL : 'http://www.mh160.com/',
// 之後更改域名→ http://www.mh160.com/
// 2019/2/22?更改域名與名稱→ 来漫画 https://www.laimanhua.com/
base_URL : 'https://www.laimanhua.com/',
charset : 'gb2312',

// 解析 作品名稱 → 作品id get_work()
Expand Down Expand Up @@ -82,6 +83,7 @@ var crawler = new CeL.work_crawler({

work_data.author = work_data.原著作者;
work_data.last_update = work_data.更新时间;
// console.log(work_data);
return work_data;
},
get_chapter_list : function(work_data, html, get_label) {
Expand Down Expand Up @@ -117,7 +119,9 @@ var crawler = new CeL.work_crawler({
// use String.prototype.splic
chapter_data = eval(chapter_data).between("picTree='", "'");
} else {
chapter_data = html.between('picTree ="', '"');
chapter_data = html.between("picTree ='", "'")
// 2019/2/23 改用 picTree ='~~'
|| html.between('picTree ="', '"');
}
// console.log(chapter_data);
if (chapter_data) {
Expand Down
6 changes: 3 additions & 3 deletions gui_electron/gui_electron_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ function initializer() {
// --------------------------------

_ = CeL.gettext;
// .set_fallback(): failed
// _.set_fallback([ 'en', 'TW', 'CN', 'ja' ]);

_.create_menu('language_menu', [ 'TW', 'CN', 'ja', 'en', 'ko' ],
// 預設介面語言繁體中文+...
Expand All @@ -233,6 +231,7 @@ function initializer() {
// --------------------------------

var force_convert = 'en,zh';
_.load_domain('en');
if (!global.data_directory) {
global.data_directory = CeL.determin_download_directory();
}
Expand Down Expand Up @@ -757,7 +756,7 @@ function reset_favorites(crawler) {

function get_id_of_title(work_title, is_id) {
var work_id = is_id ? work_title : search_result[work_title];
if (crawler.id_of_search_result) {
if (work_id !== undefined && crawler.id_of_search_result) {
work_id = typeof crawler.id_of_search_result === 'function'
// @see function finish(no_cache) @ work_crawler.js
? crawler.id_of_search_result(work_id)
Expand All @@ -773,6 +772,7 @@ function reset_favorites(crawler) {
href : '#',
onclick : function() {
add_new_download_job(crawler, work_title);
return false;
}
} ];

Expand Down
13 changes: 12 additions & 1 deletion work_crawler_loder.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,18 @@ if (is_CLI && !work_id && process.mainModule
+ Object.entries(CeL.work_crawler.prototype.import_arg_hash)
//
.map(function(pair) {
return '\n ' + pair[0] + ' (' + pair[1] + ')';
var arg_type_data = pair[1];
return '\n ' + pair[0] + ' ('
// @see function initializer() @ gui_electron_functions.js
+ Object.keys(arg_type_data).map(function(type) {
var condition = arg_type_data[type];
if (Array.isArray(condition)) {
condition = condition.join('; ');
} else {
condition = JSON.stringify(condition);
}
return type + (condition ? ': ' + condition : '');
}).join(' | ') + ')';
}).join(''));

process.exit();
Expand Down

0 comments on commit 2a8eef1

Please sign in to comment.