diff --git a/crates/uv-client/src/html.rs b/crates/uv-client/src/html.rs
index 648c5165a..9ea658013 100644
--- a/crates/uv-client/src/html.rs
+++ b/crates/uv-client/src/html.rs
@@ -1,6 +1,6 @@
use std::str::FromStr;
-use tl::{HTMLTag, Parser};
+use tl::HTMLTag;
use tracing::{instrument, warn};
use url::Url;
@@ -44,7 +44,12 @@ impl SimpleHtml {
.iter()
.filter_map(|node| node.as_tag())
.filter(|link| link.name().as_bytes() == b"a")
- .map(|link| Self::parse_anchor(link, dom.parser()))
+ .map(|link| Self::parse_anchor(link))
+ .filter_map(|result| match result {
+ Ok(None) => None,
+ Ok(Some(file)) => Some(Ok(file)),
+ Err(err) => Some(Err(err)),
+ })
.collect::, _>>()?;
// While it has not been positively observed, we sort the files
// to ensure we have a defined ordering. Otherwise, if we rely on
@@ -70,14 +75,18 @@ impl SimpleHtml {
}
/// Parse a [`File`] from an `` tag.
- fn parse_anchor(link: &HTMLTag, parser: &Parser) -> Result {
+ ///
+ /// Returns `None` if the `` don't doesn't have an `href` attribute.
+ fn parse_anchor(link: &HTMLTag) -> Result