1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 16:15:32 +02:00
This commit is contained in:
Jan Lukas Gernert 2023-03-02 01:09:48 +01:00
parent 6964724102
commit d93f5c9677

View file

@ -40,8 +40,9 @@ pub static POSITIVE: Lazy<Regex> =
).case_insensitive(true).build()
.expect("POSITIVE regex")
});
pub static NEGATIVE: Lazy<Regex> =
Lazy::new(|| Regex::new(r#"-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget"#).expect("NEGATIVE regex"));
pub static NEGATIVE: Lazy<Regex> = Lazy::new(|| {
Regex::new(r#"-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget"#).expect("NEGATIVE regex")
});
pub static TITLE_SEPARATOR: Lazy<Regex> =
Lazy::new(|| Regex::new(r#"[-|\\/>»]"#).expect("TITLE_SEPARATOR regex"));