mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 18:13:25 +00:00
pr feedback
This commit is contained in:
@@ -12,7 +12,7 @@ type DPlayerSourcesResponse = {
|
|||||||
export const smashyStreamDScraper = makeEmbed({
|
export const smashyStreamDScraper = makeEmbed({
|
||||||
id: 'smashystream-d',
|
id: 'smashystream-d',
|
||||||
name: 'SmashyStream (D)',
|
name: 'SmashyStream (D)',
|
||||||
rank: 410,
|
rank: 71,
|
||||||
async scrape(ctx) {
|
async scrape(ctx) {
|
||||||
const mainPageRes = await ctx.proxiedFetcher<string>(ctx.url, {
|
const mainPageRes = await ctx.proxiedFetcher<string>(ctx.url, {
|
||||||
headers: {
|
headers: {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { flags } from '@/main/targets';
|
import { flags } from '@/main/targets';
|
||||||
import { makeEmbed } from '@/providers/base';
|
import { makeEmbed } from '@/providers/base';
|
||||||
import { Caption } from '@/providers/captions';
|
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
|
||||||
|
|
||||||
type FPlayerResponse = {
|
type FPlayerResponse = {
|
||||||
sourceUrls: string[];
|
sourceUrls: string[];
|
||||||
@@ -10,7 +10,7 @@ type FPlayerResponse = {
|
|||||||
export const smashyStreamFScraper = makeEmbed({
|
export const smashyStreamFScraper = makeEmbed({
|
||||||
id: 'smashystream-f',
|
id: 'smashystream-f',
|
||||||
name: 'SmashyStream (F)',
|
name: 'SmashyStream (F)',
|
||||||
rank: 400,
|
rank: 70,
|
||||||
async scrape(ctx) {
|
async scrape(ctx) {
|
||||||
const res = await ctx.proxiedFetcher<FPlayerResponse>(ctx.url, {
|
const res = await ctx.proxiedFetcher<FPlayerResponse>(ctx.url, {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -28,9 +28,8 @@ export const smashyStreamFScraper = makeEmbed({
|
|||||||
if (language && url) {
|
if (language && url) {
|
||||||
return {
|
return {
|
||||||
url: url.replace(',', ''),
|
url: url.replace(',', ''),
|
||||||
language,
|
language: labelToLanguageCode(language) ?? '',
|
||||||
kind: 'subtitles',
|
type: getCaptionTypeFromUrl(url) ?? 'vtt',
|
||||||
type: url.includes('.vtt') ? 'vtt' : 'srt',
|
|
||||||
hasCorsRestrictions: false,
|
hasCorsRestrictions: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -57,7 +57,7 @@ const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Pr
|
|||||||
export const smashyStreamScraper = makeSourcerer({
|
export const smashyStreamScraper = makeSourcerer({
|
||||||
id: 'smashystream',
|
id: 'smashystream',
|
||||||
name: 'SmashyStream',
|
name: 'SmashyStream',
|
||||||
rank: 400,
|
rank: 70,
|
||||||
flags: [flags.NO_CORS],
|
flags: [flags.NO_CORS],
|
||||||
scrapeMovie: universalScraper,
|
scrapeMovie: universalScraper,
|
||||||
scrapeShow: universalScraper,
|
scrapeShow: universalScraper,
|
||||||
|
Reference in New Issue
Block a user