mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-09 08:55:31 +02:00
small fixes
This commit is contained in:
parent
4ca4b73823
commit
848291e4f3
4 changed files with 36 additions and 43 deletions
|
@ -289,12 +289,7 @@ impl Util {
|
|||
// (because this is depth-first traversal, we will have already
|
||||
// seen the parent nodes themselves).
|
||||
loop {
|
||||
let parent = node.get_parent();
|
||||
if parent.is_none() {
|
||||
break;
|
||||
}
|
||||
|
||||
if let Some(parent) = parent {
|
||||
if let Some(parent) = node.get_parent() {
|
||||
let parent_name = parent.get_name().to_uppercase();
|
||||
if parent_name == "HTML" {
|
||||
break;
|
||||
|
@ -306,6 +301,8 @@ impl Util {
|
|||
} else {
|
||||
node = parent;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue