mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-08 16:40:00 +02:00
refactor & more testing
This commit is contained in:
parent
7ae98904d4
commit
e3246af28b
14 changed files with 1969 additions and 101 deletions
|
@ -86,7 +86,8 @@ impl Util {
|
|||
for node in res {
|
||||
let content = node.get_content();
|
||||
let url_str = if content.trim().is_empty() && node.has_attribute("href") {
|
||||
node.get_attribute("href").unwrap()
|
||||
node.get_attribute("href")
|
||||
.expect("already checked for href")
|
||||
} else {
|
||||
content
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue