fix(handler): skip invalid CSV URLs

This commit is contained in:
WebStreamr 2025-06-05 19:56:45 +00:00
parent d8f0c4602c
commit 04ee59e9d3
No known key found for this signature in database
2 changed files with 1 additions and 12 deletions

View file

@ -33,7 +33,7 @@ export class Frembed implements Handler {
const urls: URL[] = [];
for (const key in json) {
if (key.startsWith('link')) {
if (key.startsWith('link') && json[key] && !json[key].includes(',https')) {
try {
urls.push(new URL(json[key].trim()));
} catch {

View file

@ -2,17 +2,6 @@
exports[`Frembed handle imdb black mirror s4e2 1`] = `
[
{
"error": [Error: TypeError: fetch failed],
"isExternal": true,
"label": "ahvsh.com",
"meta": {
"countryCode": "fr",
"title": "Black Mirror 4x2",
},
"sourceId": "external",
"url": "https://ahvsh.com/e/83izf7qzwpae,https://netu.frembed.fun/e/0DFgfkcXOsDP,https://likessb.com/e/7yjgl1x56n08.html,https://ds2play.com/e/fzfvfq3ngig0",
},
{
"label": "DoodStream",
"meta": {