mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +02:00
cleanup
This commit is contained in:
parent
4031750956
commit
aaff97c184
1 changed files with 4 additions and 5 deletions
|
@ -202,14 +202,13 @@ impl Util {
|
|||
|
||||
for mut node in node_vec {
|
||||
let tag_name = node.get_name();
|
||||
if constants::EMBED_TAG_NAMES.contains(tag_name.to_uppercase().as_str()) {
|
||||
if node
|
||||
if constants::EMBED_TAG_NAMES.contains(tag_name.to_uppercase().as_str())
|
||||
&& node
|
||||
.get_attributes()
|
||||
.iter()
|
||||
.any(|(_name, value)| constants::VIDEOS.is_match(value))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
{
|
||||
continue;
|
||||
}
|
||||
node.unlink();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue