improved Error resistance
This commit is contained in:
@@ -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 ")
|
||||||
|
|||||||
Reference in New Issue
Block a user