fix: use proxied fetcher

This commit is contained in:
Isra 2023-10-03 16:46:27 -05:00
parent 8baeb90bee
commit f82457ed62
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ export const febBoxScraper = makeEmbed({
rank: 160, rank: 160,
async scrape(ctx) { async scrape(ctx) {
const shareKey = ctx.url.split('/')[4]; const shareKey = ctx.url.split('/')[4];
const streams = await ctx.fetcher<{ const streams = await ctx.proxiedFetcher<{
data?: { data?: {
file_list?: { file_list?: {
fid?: string; fid?: string;
@ -34,7 +34,7 @@ export const febBoxScraper = makeEmbed({
formParams.append('fid', fid); formParams.append('fid', fid);
formParams.append('share_key', shareKey); formParams.append('share_key', shareKey);
const player = await ctx.fetcher<string>('/file/player', { const player = await ctx.proxiedFetcher<string>('/file/player', {
baseUrl: febBoxBase, baseUrl: febBoxBase,
body: formParams, body: formParams,
method: 'POST', method: 'POST',

View File

@ -14,7 +14,7 @@ export const showBoxScraper = makeSourcerer({
rank: 20, rank: 20,
flags: [flags.NO_CORS], flags: [flags.NO_CORS],
async scrapeMovie(ctx) { async scrapeMovie(ctx) {
const search = await ctx.fetcher<string>('/search', { const search = await ctx.proxiedFetcher<string>('/search', {
baseUrl: showboxBase, baseUrl: showboxBase,
query: { query: {
keyword: ctx.media.title, keyword: ctx.media.title,
@ -39,7 +39,7 @@ export const showBoxScraper = makeSourcerer({
if (!result?.path) throw new NotFoundError('no result found'); if (!result?.path) throw new NotFoundError('no result found');
const febboxResult = await ctx.fetcher<{ const febboxResult = await ctx.proxiedFetcher<{
data?: { link?: string }; data?: { link?: string };
}>('/index/share_link', { }>('/index/share_link', {
baseUrl: showboxBase, baseUrl: showboxBase,