fix(extractor): use correct xprime referer

This commit is contained in:
WebStreamr 2025-09-10 18:41:49 +00:00
parent c9e4dfce68
commit 531ad7562a
No known key found for this signature in database

View file

@ -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;