fix: use proxied fetcher
This commit is contained in:
parent
8baeb90bee
commit
f82457ed62
|
@ -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',
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue