koishi-plugin-oni-sync-bot 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +5 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -62,7 +62,10 @@ async function getAndProcessPageContent(site, pageTitle) {
|
|
|
62
62
|
try {
|
|
63
63
|
let rawText = "";
|
|
64
64
|
try {
|
|
65
|
-
const res = await site.read(pageTitle
|
|
65
|
+
const res = await site.read(pageTitle, {
|
|
66
|
+
redirects: false
|
|
67
|
+
// 不自动跟随重定向
|
|
68
|
+
});
|
|
66
69
|
if (res) {
|
|
67
70
|
if (typeof res === "string") {
|
|
68
71
|
rawText = res;
|
|
@@ -815,7 +818,7 @@ __name(syncAllImages, "syncAllImages");
|
|
|
815
818
|
|
|
816
819
|
// src/sync/pageSync.ts
|
|
817
820
|
var CONFIG2 = {
|
|
818
|
-
IGNORED_PAGES: /* @__PURE__ */ new Set(["教程", "MediaWiki:Common.css"]),
|
|
821
|
+
IGNORED_PAGES: /* @__PURE__ */ new Set(["教程", "MediaWiki:Common.css", "首页", "Main Page"]),
|
|
819
822
|
SYNC_INTERVAL_SUCCESS: 500,
|
|
820
823
|
SYNC_INTERVAL_FAILED: 1e3,
|
|
821
824
|
NAMESPACE: 0,
|