fix(handler): skip invalid CSV URLs
This commit is contained in:
parent
d8f0c4602c
commit
04ee59e9d3
2 changed files with 1 additions and 12 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue