fix(api): generalize anchor selector

This commit is contained in:
Mariano Riefolo 2024-09-11 13:06:14 +02:00
parent e5cdab0fc1
commit cbac5ee395

View File

@ -44,7 +44,7 @@ async fn get_pdf_links() -> Result<Vec<String>, reqwest::Error> {
.await?;
let dom = Html::parse_document(&response);
let selector = Selector::parse(".wp-block-list > li > a").unwrap();
let selector = Selector::parse("a:has(> strong)[href*=pdf]").unwrap();
let mut result = Vec::new();
for element in dom.select(&selector) {