fix(extractor): use correct xprime referer
This commit is contained in:
parent
c9e4dfce68
commit
531ad7562a
1 changed files with 3 additions and 1 deletions
|
|
@ -27,7 +27,9 @@ export class XPrime extends Extractor {
|
|||
protected async extractInternal(ctx: Context, url: URL, meta: Meta): Promise<UrlResult[]> {
|
||||
const urlResults: UrlResult[] = [];
|
||||
|
||||
const headers = { Referer: meta.referer ?? url.protocol + '//' + url.hostname.split('.').slice(-2).join('.') };
|
||||
const headers = {
|
||||
Referer: url.protocol + '//' + url.hostname.split('.').slice(-2).join('.'), // Strip subdomains
|
||||
};
|
||||
|
||||
if (url.href.includes('primebox')) {
|
||||
const jsonResponse = JSON.parse(await this.fetcher.text(ctx, url)) as XPrimePrimeboxResponsePartial;
|
||||
|
|
|
|||
Loading…
Reference in a new issue