Skip to content

Commit

Permalink
fix(core): 发现页地址处理
Browse files Browse the repository at this point in the history
  • Loading branch information
aooiuu committed Sep 1, 2024
1 parent 90c69e7 commit 78a407a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/analyzer/RuleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ export class RuleManager {
];
}
const chapterUrl = this.rule.chapterUrl || result;
const { body } = await fetch(await this.parseUrl(chapterUrl), '', result, this.rule);
const { body, params } = await fetch(await this.parseUrl(chapterUrl), '', result, this.rule);
console.log('[request]', params);

JSEngine.setEnvironment({
page: 1,
Expand Down Expand Up @@ -214,7 +215,7 @@ export class RuleManager {
const discovers = Array.isArray(discoverUrl)
? discoverUrl.map((e) => e.toString())
: typeof discoverUrl === 'string'
? discoverUrl.split(/[\n*]|&&/)
? discoverUrl.split(/\n\s*|&&/)
: [];

for (const url of discovers) {
Expand Down

0 comments on commit 78a407a

Please sign in to comment.