fix(extractor): do not pass referer for Uqload MFP requests
deals with error_wrong_ip responses we got before
This commit is contained in:
parent
a54ae2b151
commit
298ac96558
3 changed files with 3 additions and 5 deletions
|
|
@ -21,9 +21,7 @@ export class Uqload extends Extractor {
|
|||
}
|
||||
|
||||
protected async extractInternal(ctx: Context, url: URL, meta: Meta): Promise<UrlResult[]> {
|
||||
const headers = { Referer: meta.referer ?? url.href };
|
||||
|
||||
const html = await this.fetcher.text(ctx, url, { headers });
|
||||
const html = await this.fetcher.text(ctx, url);
|
||||
|
||||
if (/File Not Found/.test(html)) {
|
||||
throw new NotFoundError();
|
||||
|
|
@ -34,7 +32,7 @@ export class Uqload extends Extractor {
|
|||
const $ = cheerio.load(html);
|
||||
const title = $('h1').text().trim();
|
||||
|
||||
const mp4Url = buildMediaFlowProxyExtractorRedirectUrl(ctx, 'Uqload', url, headers);
|
||||
const mp4Url = buildMediaFlowProxyExtractorRedirectUrl(ctx, 'Uqload', url);
|
||||
|
||||
return [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ exports[`Uqload uqload.net /embed- 1`] = `
|
|||
},
|
||||
"sourceId": "uqload_",
|
||||
"ttl": 900000,
|
||||
"url": "https://mediaflow.test.org/extractor/video?host=Uqload&api_password=test&d=https%3A%2F%2Fuqload.net%2Fz0xbr87oz637.html&h_referer=https%3A%2F%2Fuqload.net%2Fz0xbr87oz637.html&redirect_stream=true",
|
||||
"url": "https://mediaflow.test.org/extractor/video?host=Uqload&api_password=test&d=https%3A%2F%2Fuqload.net%2Fz0xbr87oz637.html&redirect_stream=true",
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue