Skip to content

Commit

Permalink
archive 23us.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Mar 17, 2024
1 parent ec80636 commit ab7e4f6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions novel.cmn-Hans-CN/23us.js → archive/23us.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/**
* 批量下載 2011 顶点小说 的工具。 Download 23us novels.
*
* 這網站可能使用 PTCMS?
*/

'use strict';
Expand All @@ -21,14 +23,16 @@ var crawler = new CeL.work_crawler({
recheck : 'changed',

// one_by_one : true,
base_URL : 'https://www.x23us.com/',

// 2020/2/29: https://www.x23us.com/
base_URL : 'https://www.23ddw.cc/',
charset : 'gbk',

// 解析 作品名稱 → 作品id get_work()
search_URL : 'modules/article/search.php?searchtype=keywords&searchkey=',
parse_search_result : function(html, get_label) {
// console.log(html);
var matched = html.match(/og:url" content="[^<>"]+?\/(\d+)"/);
var matched = html.match(/og:url" content="[^<>"]+?\/(\d+)\/?"/);
if (matched) {
return [ [ +matched[1] ],
//
Expand All @@ -48,7 +52,9 @@ var crawler = new CeL.work_crawler({
// console.log(text);
var matched = text.match(
//
/<a href="[^<>"]+?\/(\d+)">([\s\S]+?)<\/a>/);
/<a href="[^<>"]+?\/(\d+)\/?"[^<>]*>([\s\S]+?)<\/a>/);
if (!matched)
return;
id_list.push(+matched[1]);
id_data.push(get_label(matched[2]));
});
Expand Down

0 comments on commit ab7e4f6

Please sign in to comment.