Skip to content

Commit

Permalink
v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Jun 21, 2019
1 parent 731038f commit 4b8e3e5
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Plese fill the template when you reporting a new issue, thank you!
* **Version**: <!-- 您使用的 work_crawler 為哪個版本: 安裝包, 懶人安裝法 -->
* **Interface**: <!-- 您使用的 work_crawler 為哪個介面: 圖形介面, 命令列介面 -->

<!-- 請描述出了什麼問題、下載的網站與作品名稱、造成問題的操作步驟、您預期的行為等。您可貼上錯誤訊息或者執行時的畫面,謝謝。 -->
<!-- 請描述出了什麼問題、下載的網站與作品名稱、造成問題的操作步驟、您預期的行為等。您可貼上錯誤訊息與執行時的畫面,謝謝。 -->

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Welcome to join [the translating project](https://github.com/kanasimi/work_crawl
| [WEBTOON](https://www.webtoons.com/zh-hant/) | webtoon.js | NAVER WEBTOON 中文官網 韓國漫畫<br />本工具無法下載有動態效果的漫畫。 |
| [咚漫中文官网](https://www.dongmanmanhua.cn/) | dongman.js | NAVER WEBTOON 中文官网 韩国漫画<br />本工具無法下載有動態效果的漫畫。 |
| [57漫画网](http://www.wuqimh.com/) | 57mh.js | 缺話眾多。系統同 2manhua.js。可能是2013年版本的 圣樱漫画管理系统? MHD模板? |
| [99漫畫網](https://www.999comics.com/) | 999comics.js | 可能是2013年版本的 圣樱漫画管理系统? MHD模板(漫画岛)? |
| [99漫畫網](https://www.999comics.com/) | 999comics.js | 可能是2013年版本的 圣樱漫画管理系统? MHD模板(漫画岛)?2019/6/18 19:46 測試中陸續發現PC端有頁面404。 |
| ~~[热漫吧](http://www.remanba.com/)~~ | ~~archive/remanba.js~~ | 自 2016/12/27 14:42 最後一次成功連接後,下午起就持續 404 至 2018/6/11 未復原。 |
| ~~[三七阅读](http://www.37yue.com/)~~ | ~~archive/37yue.js~~ | 自 2017/6/9 下午最後一次連接後,2017/6/10 9時起就持續 404 至 2018/6/11 未復原。 |
| ~~[爱漫画](http://www.2manhua.com/)~~ | ~~archive/2manhua.js~~ | 許多作品似乎從2017/9/3起就沒有更新。2017/5/16 4:43 最後一次成功連接,至 2018/6/11 未復原。 |
Expand Down
2 changes: 1 addition & 1 deletion comic.cmn-Hans-CN/999comics.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var crawler = CeL.SinMH2013({
image_preprocessor : function(contents, image_data) {
var index = contents.length - 2;
if (contents[index] === 0x0D && contents[index + 1] === 0x0A) {
// 去掉最後的換行符號:有些圖片會被加上換行符號 "\r\n"。
// 去掉最後的換行符號:有些圖片在檔案最後會添加上換行符號 "\r\n",因此被判別為非正規圖片檔
// r.g., 34444 異世界精靈的奴隸醬, 33485 會歪掉的啊
return contents.slice(0, -2);
}
Expand Down
4 changes: 2 additions & 2 deletions comic.cmn-Hans-CN/qq.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var crawler = new CeL.work_crawler({
// recheck:從頭檢測所有作品之所有章節。
// recheck : true,
// one_by_one : true,
base_URL : 'http://ac.qq.com/',
base_URL : 'https://ac.qq.com/',

// https://github.com/kanasimi/work_crawler/issues/251
// e.g., 630166 19天
Expand Down Expand Up @@ -116,7 +116,7 @@ var crawler = new CeL.work_crawler({

// 取得作品的章節資料。 get_work_data()
work_URL : function(work_id) {
return 'Comic/comicInfo/id/' + (work_id | 0);
return 'Comic/comicInfo/id/' + work_id;
},
parse_work_data : function(html, get_label) {
// work_data={id,title,author,authors,chapter_count,last_update,last_download:{date,chapter}}
Expand Down
29 changes: 19 additions & 10 deletions novel.cmn-Hans-CN/ck101.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ crawler = new CeL.work_crawler({
+ '&extra=page%3D1&page=' + chapter_NO;
},
parse_chapter_data : function(html, work_data, get_label, chapter_NO) {
//
// TODO: book_chapter, work_data, as arguments
function book_chapter_is_OK(matched, diff) {
if (false) {
console.log([ 'book_chapter_is_OK', book_chapter, matched,
Expand All @@ -391,7 +391,7 @@ crawler = new CeL.work_crawler({
// /<div id="(post_\d+)" class="plhin">/g
PATTERN_chapter = /<div id="(post_\d+)"/g,
//
matched, matched_list = [];
matched, topic_index_list = [];

// 處理實際頁數與之前得到頁數不同的問題。
if (raw_data.pagination < chapter_NO
Expand Down Expand Up @@ -434,13 +434,22 @@ crawler = new CeL.work_crawler({
}

while (matched = PATTERN_chapter.exec(html)) {
matched_list.push([ matched.index, matched[1] ]);
topic_index_list.push([ matched.index, matched[1] ]);
}
topic_index_list.push([ html.length ]);

if (false) {
topic_index_list
// TODO: book_chapter
.forEach(function(topic_index, index, topic_index_list) {
for_each_topic.call(this, html, work_data, mainEntity,
topic_index, index, topic_index_list);
});
}
matched_list.push([ html.length ]);

for (var index = 0; index < matched_list.length - 1; index++) {
var text = html.slice(matched_list[index][0],
matched_list[index + 1][0]),
for (var index = 0; index < topic_index_list.length - 1; index++) {
var text = html.slice(topic_index_list[index][0],
topic_index_list[index + 1][0]),
//
date = text.between(' class="postDateLine">', '</span>');
if (date) {
Expand Down Expand Up @@ -631,20 +640,20 @@ crawler = new CeL.work_crawler({
text = text.trim();

if (this.latest_chapter_title === chapter_title
// && this.latest_chapter_hash === matched_list[index][1]
// && this.latest_chapter_hash === topic_index_list[index][1]
&& this.latest_chapter_text === text) {
CeL.log('偵測到重複章節,將跳過: ' + chapter_title);
continue;
}
this.latest_chapter_title = chapter_title;
// this.latest_chapter_hash = matched_list[index][1];
// this.latest_chapter_hash = topic_index_list[index][1];
this.latest_chapter_text = text;

this.add_ebook_chapter(work_data, work_data.book_chapter_count, {
title : chapter_title,
text : text,
url : this.full_URL(this.chapter_URL(work_data, chapter_NO))
+ '#' + matched_list[index][1],
+ '#' + topic_index_list[index][1],
date : date || new Date(mainEntity.dateModified)
});
}
Expand Down
2 changes: 1 addition & 1 deletion novel.cmn-Hans-CN/daocaoren.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var crawler = new CeL.work_crawler({
text = text.between(null, {
tail : '</div>'
}).replace(/<script[^<>]*>[\s\S]*?<\/script>/g, '').replace(
// 去除廣告
// 去除廣告
/<(i|p|span) class='[a-z]{3}\d{3}'>[^<>]{0,30}<\/\1>/ig, '').trim();
// console.log(text);

Expand Down
2 changes: 1 addition & 1 deletion novel.cmn-Hans-CN/zhuishubang.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var PATTERN_ads = /免-费-首-发→【追】【书】【帮】|★首发追书
//
crawler = CeL.jieqi_article({

base_URL : 'http://www.zhuishubang.com/',
base_URL : 'https://www.zhuishubang.com/',

inverted_order : true,

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "work_crawler",
"title" : "CeJS online novels and comics downloader",
"version" : "v2.0.1",
"version" : "v2.1.0",
"description" : "A tool using CeJS library to download online novels / comics.",
"keywords" : [ "comic-downloader", "novel-downloader", "cejs",
"downloader", "download-comic", "epub", "ebook", "comics",
Expand Down
Binary file modified resource/cmn-Hans-CN.js
Binary file not shown.
Binary file modified resource/cmn-Hant-TW.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.
1 change: 1 addition & 0 deletions work_crawler_loder.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function option_type_token(arg_type_data, colors) {
}
});
if (condition) {
// TODO: onclick
option_types.push(': ', {
T : condition,
S : {
Expand Down

0 comments on commit 4b8e3e5

Please sign in to comment.