mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 11:33:25 +00:00
change rank and add comments
This commit is contained in:
@@ -9,9 +9,11 @@ export function parseSearch(page: string): { title: string; year?: number; url:
|
|||||||
$('.items .poster').each((_, element) => {
|
$('.items .poster').each((_, element) => {
|
||||||
const $link = $(element).find('a');
|
const $link = $(element).find('a');
|
||||||
const url = $link.attr('href');
|
const url = $link.attr('href');
|
||||||
|
// ex title: Home Alone (1990)
|
||||||
const [, title, year] = $link.attr('title')?.match(/^(.*?)\s*(?:\((\d{4})\))?\s*$/) || [];
|
const [, title, year] = $link.attr('title')?.match(/^(.*?)\s*(?:\((\d{4})\))?\s*$/) || [];
|
||||||
if (!title || !url) return;
|
if (!title || !url) return;
|
||||||
|
|
||||||
|
// tiles dont always have the year
|
||||||
results.push({ title, year: year ? parseInt(year, 10) : undefined, url });
|
results.push({ title, year: year ? parseInt(year, 10) : undefined, url });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ import { baseUrl, parseSearch } from './common';
|
|||||||
export const tugaflixScraper = makeSourcerer({
|
export const tugaflixScraper = makeSourcerer({
|
||||||
id: 'tugaflix',
|
id: 'tugaflix',
|
||||||
name: 'Tugaflix',
|
name: 'Tugaflix',
|
||||||
rank: 112,
|
rank: 73,
|
||||||
flags: [flags.IP_LOCKED],
|
flags: [flags.IP_LOCKED],
|
||||||
scrapeMovie: async (ctx) => {
|
scrapeMovie: async (ctx) => {
|
||||||
const searchResults = parseSearch(
|
const searchResults = parseSearch(
|
||||||
@@ -50,6 +50,8 @@ export const tugaflixScraper = makeSourcerer({
|
|||||||
embedId: 'streamtape',
|
embedId: 'streamtape',
|
||||||
url: finalUrl,
|
url: finalUrl,
|
||||||
});
|
});
|
||||||
|
// found doodstream on a few shows, maybe movies use it too?
|
||||||
|
// the player 2 is just streamtape in a custom player
|
||||||
} else if (finalUrl.includes('dood')) {
|
} else if (finalUrl.includes('dood')) {
|
||||||
embeds.push({
|
embeds.push({
|
||||||
embedId: 'dood',
|
embedId: 'dood',
|
||||||
@@ -84,7 +86,7 @@ export const tugaflixScraper = makeSourcerer({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const embedUrl = load(videoPage)('iframe[name="player"]').attr('src');
|
const embedUrl = load(videoPage)('iframe[name="player"]').attr('src');
|
||||||
if (!embedUrl) throw new Error('Failed to find taprUrl');
|
if (!embedUrl) throw new Error('Failed to find iframe');
|
||||||
|
|
||||||
const playerPage = await ctx.proxiedFetcher(embedUrl.startsWith('https:') ? embedUrl : `https:${embedUrl}`, {
|
const playerPage = await ctx.proxiedFetcher(embedUrl.startsWith('https:') ? embedUrl : `https:${embedUrl}`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
Reference in New Issue
Block a user