improved Error resistance

This commit is contained in:
Simon
2026-01-21 11:24:03 +00:00
parent e7fb0ed723
commit 5224a2eb47

View File

@@ -288,6 +288,7 @@ impl HqpornerProvider {
} }
}) })
.filter_map(Result::ok) .filter_map(Result::ok)
.filter(|item| !item.formats.clone().unwrap().is_empty())
.collect() .collect()
} }
@@ -401,6 +402,10 @@ impl HqpornerProvider {
.await? .await?
.text() .text()
.await?; .await?;
// Check for error response
if text2.starts_with("ERR:"){
return Ok((tags, formats));
}
let video_element = text2 let video_element = text2
.split("<video ") .split("<video ")