Update FileMoon.ts
To fix /d/ type of links which at the moment it failed to do so
This commit is contained in:
parent
10081a2276
commit
959bf0175d
1 changed files with 5 additions and 1 deletions
|
|
@ -42,9 +42,13 @@ export class FileMoon extends Extractor {
|
|||
}
|
||||
|
||||
public override normalize(url: URL): URL {
|
||||
return new URL(url.href.replace('/e/', '/d/'));
|
||||
if (url.pathname.startsWith('/d/')) {
|
||||
return new URL(url.href.replace('/d/', '/e/'));
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
protected async extractInternal(ctx: Context, url: URL, meta: Meta, originalUrl?: URL): Promise<UrlResult[]> {
|
||||
const headers = { Referer: meta.referer ?? url.href };
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue