fix(api): generalize anchor selector
This commit is contained in:
parent
e5cdab0fc1
commit
cbac5ee395
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user