From f47e536fd177e634a5167086880b485cd2bc65d6 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 28 Mar 2022 22:11:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E9=83=A8=E5=88=86=20Type?= =?UTF-8?q?cho=20=E7=BD=91=E7=AB=99]=20=E9=80=9A=E7=94=A8=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 21 ++++++++++++++++++--- other/Autopage/rules.json | 12 ++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index edf9e8f..181853a 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -241,7 +241,7 @@ console.info(`[自动无缝翻页] - 部分使用 WordPress 的网站 (a.next)`); return 100; } else if (getCSS('a[rel="next" i], a[aria-label="Next Page" i], a[aria-label="下一页"]')) { console.info(`[自动无缝翻页] - 部分使用 WordPress 的网站 (a[rel="next"])`); return 101; - } else if (getCSS('li.next-page > a')) { + } else if (getCSS('li.next-page > a, li.next > a')) { console.info(`[自动无缝翻页] - 部分使用 WordPress 的网站 (li.next-page > a)`); return 102; } else if (getCSS('.nav-previous a, a.nav-previous')) { console.info(`[自动无缝翻页] - 部分使用 WordPress 的网站 (旧文章)`); return 103; @@ -249,6 +249,10 @@ console.info(`[自动无缝翻页] - 部分使用 WordPress 的网站 (下一页)`); return 104; } } + } else if (getCSS('meta[name="generator" i][content*="Typecho" i]')) { + if (getCSS('li.next > a') && getCSS('.blog-post, .post-list') && getCSS('.page-navigator')) { + console.info(`[自动无缝翻页] - 部分使用 Typecho 的网站 (handsome)`); return 150; + } } else if (getCSS('meta[name="description" i][content*="小说"], meta[name="description" i][content*="章节"], meta[name="description" i][content*="阅读"]') || location.hostname.indexOf('biqu') > -1 || document.title.indexOf('笔趣阁') > -1) { if (getCSS('#content, .content, #chaptercontent, .chaptercontent, #BookText') && getXpath('//a[contains(text(), "下一章") or contains(text(), "下一页")]')) { console.info(`[自动无缝翻页] - <笔趣阁 1> 模板的小说网站`); return 200; @@ -283,11 +287,13 @@ case 101: // < 部分使用 WordPress 的网站 (a[rel="next"]) > DBSite.wp_article.url('a[rel="next" i], a[aria-label="Next Page" i], a[aria-label="下一页"]'); break; case 102: // < 部分使用 WordPress 的网站 (li.next-page > a) > - DBSite.wp_article.url('li.next-page > a'); break; + DBSite.wp_article.url('li.next-page > a, li.next > a'); break; case 103: // < 部分使用 WordPress 的网站 (旧文章) > DBSite.wp_article.url('.nav-previous a, a.nav-previous'); break; case 104: // < 部分使用 WordPress 的网站 (下一页) > DBSite.wp_article.url('//*[self::ul or self::nav or self::div][@id="nav-below" or contains(@class, "navigation") or contains(@class, "pagination") or contains(@class, "pagenavi")]//a[contains(text(), "下一页") or contains(text(), ">") or contains(text(), "next") or contains(text(), "Next") or contains(text(), "NEXT")]'); break; + case 150: // < 部分使用 Typecho 的网站 (handsome) > + curSite = DBSite.typecho_handsome; break; case 200: // < 所有使用 笔趣阁 1 模板的小说网站 > curSite = DBSite.biquge; break; case 201: // < 所有使用 笔趣阁 2 模板的小说网站 > @@ -386,7 +392,16 @@ function: { replaceE: '#nav-below, nav.navigation, nav.paging-navigation, .pagination, .wp-pagenavi, .pagenavi', scrollD: 2000 } - }, // Wordpress 的 nav.navigation 规则 + }, // 部分使用 WordPress 的网站 + typecho_handsome: { + blank: 1, + pager: { + nextL: 'li.next > a', + pageE: '.blog-post, .post-list', + replaceE: '.page-navigator', + scrollD: 2000 + } + }, // 部分使用 Typecho 的网站 (handsome) discuz_forum: { pager: { type: 2, diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json index ca1e469..b6b1ee9 100644 --- a/other/Autopage/rules.json +++ b/other/Autopage/rules.json @@ -1926,6 +1926,18 @@ "bF": "return fun.src_bF(pageE, [0, 'img[data-src]', 'data-src'])" } }, + "核桃影院": { + "host": ["123456.li","video.tf"], + "url": "/^\\/category-/", + "pager": { + "nextL": "a[title='下一页 ›']", + "pageE": ".wrapbox > ul > li", + "replaceE": "#pagenavi" + }, + "function": { + "bF": "return fun.src_bF(pageE, [0,'img[data-original]','data-original'])" + } + }, "91 美剧网": { "host": "/mjw\\d+\\.com/", "url": "return (document.title.indexOf('91美剧') > -1 && !fun.indexOF('/w/') && !fun.indexOF('/dp/'))",