Skip to content

Commit

Permalink
fix misc sites
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Mar 4, 2020
1 parent 7425d56 commit 6bdd8f6
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 112 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
有些問題在最新版本已修復完畢,您可能得要確認使用的是最新版本的網路作品下載工具。
若是您使用後問題已解決,請記得回來關掉本議題。仍發現有相關問題的話,可重開這個議題。
遇到不同的問題,請另外開個議題來修正
遇到不同的問題,請另外開個新議題來修正
本工具以修正錯誤為主,由於人力有限,這邊主要把精力放在維護常用的網站。新增網站僅在行有餘力時為之,請見諒。
英語或韓語的網站煩請利用 Free Manga Downloader 之類軟體會比較好。這邊幾乎不會上英語或者韓語網站,就算做了出來也很少在做維護,沒有專門看英語韓語網站的工具維護得勤勞。
I am sorry that for English or Korean sites, using Free Manga Downloader is much suitable. For the deficiency of time, it is hard to maintain the tools instantly.
新增網站時,請 **一個網站開一個議題,除了在標題說明要新增網站,並加上網站名稱**。
另外增加網站往往要耗費時間、作許多考量,之後還需維護;請確認網站經常更新、付費作品不多,並請附個其他網站未揭載之作品。
太久沒有回應的議題,將會被關閉。
請在提交問題的同時,附帶如下信息,方便我們盡快幫您解決問題,謝謝。
Thank you for reporting issues.
Expand Down
10 changes: 10 additions & 0 deletions comic.cmn-Hans-CN/733dm.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ var crawler = CeL.qTcms2017({
// console.log(JSON.stringify(chapter_data));

return chapter_data;
},

// function f_qTcms_Pic_curUrl_realpic(v) @
// https://www.733.so/template/skin2/css/d7s/js/show.20190608.js?20190902222912
for_each_image : function(url, parameters, base64_encode) {
var File_Server = "https://api.733.so/newfile.php?data=";
return File_Server
+ base64_encode(url + "|" + Date.now() + "|"
+ parameters.qTcms_S_m_id + "|"
+ parameters.qTcms_S_p_id + "|pc");
}
});

Expand Down
5 changes: 3 additions & 2 deletions comic.cmn-Hans-CN/bilibili.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ var crawler = new CeL.work_crawler({

// ----------------------------------------------------------------------------

// CeL.set_debug(3);

// return t.prototype._generateHashKey = function() @
// https://s1.hdslb.com/bfs/static/manga/mobile/static/js/read.b8ba074e2011370f741a.js
function generateHashKey(t, e) {
Expand All @@ -218,4 +216,7 @@ function unhashContent(episodeId, seasonId, indexData) {
indexData[t] ^= hashKey[t % 8];
}

// ----------------------------------------------------------------------------

// CeL.set_debug(3);
start_crawler(crawler, typeof module === 'object' && module);
121 changes: 29 additions & 92 deletions comic.cmn-Hans-CN/dagu.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* 批量下載 大古漫画网 的工具。 Download dagu comics.
*
* 2018/10/19–11/24 間,[9妹漫画网](http://www.9mdm.com/)改名大古漫画网。
* 2018/10/19–11/24 間,[9妹漫画网](http://www.9mdm.com/)改名大古漫画网。<br />
* 2019/11/28–12/5 間,大古漫画网 改版,採用晴天漫画程序。
*/

'use strict';
Expand All @@ -10,108 +11,31 @@ require('../work_crawler_loader.js');

// ----------------------------------------------------------------------------

// https://stackoverflow.com/questions/20082893/unable-to-verify-leaf-signature
// for Error: unable to verify the first certificate
// code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
CeL.run('application.net.work_crawler.sites.qTcms2017');

var crawler = new CeL.work_crawler({
// 所有的子檔案要修訂註解說明時,應該都要順便更改在CeL.application.net.comic中Comic_site.prototype內的母comments,並以其為主體。
// ----------------------------------------------------------------------------

var crawler = CeL.qTcms2017({
// 圖像檔案下載失敗處理方式:忽略/跳過圖像錯誤。當404圖像不存在、檔案過小,或是被偵測出非圖像(如不具有EOI)時,依舊強制儲存檔案。default:false
skip_error : true,

// one_by_one : true,
// charset : '',

// {Natural}最小容許圖案檔案大小 (bytes)。
MIN_LENGTH : 500,

base_URL : 'https://www.dagumanhua.com/',
// fs.readdirSync('.').forEach(function(d){if(/^\d+\s/.test(d))fs.renameSync(d,'manhua-'+d);})
// fs.readdirSync('.').forEach(function(d){if(/^manhua-/.test(d))fs.renameSync(d,d.replace(/^manhua-/,''));})
// 所有作品都使用這種作品類別前綴。
common_catalog : 'manhua',

// 解析 作品名稱 → 作品id get_work()
search_URL : function(work_title) {
return [ this.base_URL + 'e/search/index.php', {
return [ 'e/search/index.php', {
show : 'title,writer',
tempid : 1,
tbname : 'sinfo',
keyboard : work_title
} ];
},
parse_search_result : function(html, get_label) {
// console.log(html);
html = html.between('<div class="cy_list">', '</div>');
var id_list = [], id_data = [];
html.each_between('<li class="title">', '</li>', function(token) {
// console.log(token);
var matched = token.match(
//
/<a href="\/([a-z]+\/[a-z_\-\d]+)\/"[^<>]*?>([^<>]+)/);
// console.log(matched);
if (this.common_catalog
// 去掉所有不包含作品類別前綴者。
&& !matched[1].startsWith(this.common_catalog + '/'))
return;
id_list.push(this.common_catalog
//
? matched[1].slice((this.common_catalog + '/').length) : matched[1]
.replace('/', '-'));
id_data.push(get_label(matched[2]));
}, this);
// console.log([ id_list, id_data ]);
return [ id_list, id_data ];
},

// 取得作品的章節資料。 get_work_data()
work_URL : function(work_id) {
return (this.common_catalog ? this.common_catalog + '/' + work_id
: work_id.replace('-', '/'))
+ '/';
},
parse_work_data : function(html, get_label, extract_work_data) {
// console.log(html);
var work_data = {
// 必要屬性:須配合網站平台更改。
title : get_label(html.between('<h1>', '</h1>')),

// 選擇性屬性:須配合網站平台更改。
description : get_label(html.between(' id="comic-description">',
'</')),
latest_chapter : get_label(html.between('<p>最新话:', '</p>')),
latest_chapter_url : html.between('<p>最新话:<a href="', '"')
};

extract_work_data(work_data, html);
extract_work_data(work_data, html.between('<h1>',
' id="comic-description">'),
/<span>([^<>:]+):([\s\S]*?)<\/span>/g);

Object.assign(work_data, {
author : work_data.作者,
status : work_data.状态,
last_update : work_data.更新时间
});

// console.log(work_data);
return work_data;
},
get_chapter_list : function(work_data, html, get_label) {
html = html.between('<div class="cy_plist', '</div>');

var matched, PATTERN_chapter =
//
/<li><a href="([^<>"]+)"[^<>]*>([\s\S]+?)<\/li>/g;

work_data.chapter_list = [];
while (matched = PATTERN_chapter.exec(html)) {
var chapter_data = {
url : matched[1],
title : get_label(matched[2])
};
work_data.chapter_list.push(chapter_data);
}
work_data.chapter_list.reverse();
// console.log(work_data.chapter_list);
},
using_web_search : true,

pre_parse_chapter_data
// 執行在解析章節資料 process_chapter_data() 之前的作業 (async)。
Expand Down Expand Up @@ -176,7 +100,17 @@ var crawler = new CeL.work_crawler({
//
+ '/' + image_count + ': ' + url, 1, 'extract_image');
// 僅保留網址資訊,節省記憶體用量。
chapter_data.image_list.push(url);
chapter_data.image_list.push({
get_URL_options : {
headers : {
// img.baidu.com.manhuapi.com 不可設定 Referer。
Referer : ''
}
},
// e.g.,
// http://img.baidu.com.manhuapi.com/c/20180926/urgglxb2nz3.jpg
url : url
});
});
}

Expand All @@ -186,9 +120,12 @@ var crawler = new CeL.work_crawler({
CeL.run_serial(function(run_next, image_NO, index) {
var image_page_url = url.replace(/(\.[^.]+)$/, '_' + image_NO
+ '$1');
// console.log('Get #' + index + ': ' + image_page_url);
process.stdout.write('Get image data page of §' + chapter_NO
+ ': ' + image_NO + '/' + image_count + '...\r');
if (false) {
console.log('Get #' + index + '/' + image_count + ': '
+ image_page_url);
}
process.stdout.write('Get image data page of §' + chapter_NO + ': '
+ image_NO + '/' + image_count + '...\r');
_this.get_URL(image_page_url, function(XMLHttp) {
extract_image(XMLHttp);
run_next();
Expand Down
14 changes: 11 additions & 3 deletions comic.cmn-Hans-CN/mymhh.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ CeL.run('application.net.work_crawler.sites.dm5');
var crawler = CeL.dm5({
// 本網站偶爾有圖片不存在的現象。
skip_error : true,
// MIN_LENGTH : 400,
MIN_LENGTH : 400,

base_URL : 'https://mymhh.com/',
// 2020/1: https://mymhh.com/
// 2020/2: https://www.mumumh.com/
base_URL : 'https://www.mumumh.com/',
// 僅能以手機觀看。
user_agent : 'Mozilla/5.0 (Linux; Android 10; Pixel 4)'
+ ' AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.'
+ (Math.random() * 1e4).toFixed(1) + ' Mobile Safari/537.36',

// 解析 作品名稱 → 作品id get_work()
// <a id="btnSearch">搜索</a>
search_URL : 'search?keyword=',

work_URL : 'book/',
work_URL : function(id) {
return 'book/' + id;
},

inverted_order : false,

Expand Down
16 changes: 13 additions & 3 deletions novel.cmn-Hans-CN/huaxiangju.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,25 @@ var crawler = CeL.jieqi_article({

inverted_order : true,

// 去掉前後網站廣告
// 去掉網站廣告
remove_ads : function(text) {
// 去掉前後網站廣告。
text = text.replace(
// 花香居提供女生言情小说在线阅读,言情小说免费阅读,言情小说TXT下载,言情小说阅读之家。https://www.huaxiangju.com/
/&#33457;&#39321;&#23621;.+?&#46;&#99;&#111;&#109;&#47;/g, '');

text = text.replace(
// remove 顶点小说WwW.XS⒉②2.COM http://www.xs222.com/
// 顶.?点.?小.?说
/[『』]?顶[『』]?点[『』]?小[『』]?说Ww[『』]?W.[『』]?X([『』]|&nbsp;)*S⒉②2.COM/, '')
// 被審查而消失、變造的文字
.replace(/大6/g, '大陆').replace(/\*\*裸/g, '赤裸裸').replace(/\*\*/g, '赤裸裸')
// 求活的意志
.replace(/求生\*\*/g, '求生意志');

text = text
// e.g., https://www.huaxiangju.com/25087/6323179.html
text = text.replace(/^(?:热门|熱門|&#160;|&amp;|&nbsp;|<br[^<>]*>|[&:;])+/,
'');
.replace(/^(?:热门|&#160;|&amp;|&nbsp;|<br[^<>]*>|[&:;])+/, '');
if (!text.includes('<div'))
text = text.replace(/<\/div>/g, '').trim();

Expand Down
14 changes: 14 additions & 0 deletions novel.cmn-Hans-CN/xbiquge.cc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ var crawler = CeL.PTCMS({
// 取得包含章節列表的文字範圍。
get_chapter_list_contents : function(html) {
return html.between('<div id="list">', '</div>');
},
// 去掉前後網站廣告。
remove_ads : function(text) {
// 去掉前後網站廣告。
text = text.replace(
// 笔趣阁 www.xbiquge.cc,最快更新不朽凡人最新章节!<br><br>
/^[\s\n]*笔趣阁.+?最新章节!(?:<br>)+/g, '').replace(
// 天才壹秒記住『愛♂去÷小?說→網』,為您提供精彩小說閱讀。<br />
/^[^<>]+提供精彩小說閱讀。<br[^<>]*>/g, '').replace(
// 天才壹秒記住『愛♂去÷小?說→網』,為您提供精彩小說閱讀。<br />
/【愛.去.小.說.網[^【】]{5,20}】/g, '');

// console.log(text);
return text;
}
});

Expand Down
Binary file modified resource/cmn-Hans-CN.js
Binary file not shown.
Binary file modified resource/en-US.js
Binary file not shown.
Binary file modified resource/ja-JP.js
Binary file not shown.
Binary file modified resource/ko-KR.js
Binary file not shown.
24 changes: 13 additions & 11 deletions work_crawler.default_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ global.auto_update = true;
global.use_cejs_mudule = true;

// ------------------------------------
// 各個網站獨特的設定/特別的個人化設定。
global.site_configuration = {};

// comico 搭配閱讀卷示範
site_configuration.comico = site_configuration.comico_jp = site_configuration.comico_jp_plus = {
// 讓本工具自動使用閱讀卷。警告:閱讀券使用完就沒了。不可回復。
// auto_use_ticket : true,
// 警告:帳號資訊是用明碼存放在檔案中。
loginid : '',
password : ''
};

// 代理伺服器 "hostname:port"
global.proxy_server = '';
Expand All @@ -56,3 +45,16 @@ global.completed_directory = [ '', '' ];

// 檔案分類完後要放置的標的目錄。
global.catalog_directory = '';

// ------------------------------------
// 各個網站獨特的設定/特別的個人化設定。
global.site_configuration = {};

// comico 搭配閱讀卷示範
site_configuration.comico = site_configuration.comico_jp = site_configuration.comico_jp_plus = {
// 讓本工具自動使用閱讀卷。警告:閱讀券使用完就沒了。不可回復。
// auto_use_ticket : true,
// 警告:帳號資訊是用明碼存放在檔案中。
loginid : '',
password : ''
};

0 comments on commit 6bdd8f6

Please sign in to comment.