1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 16:15:32 +02:00

fix negative regex

This commit is contained in:
Jan Lukas Gernert 2023-03-02 01:08:28 +01:00
parent aaff97c184
commit 02e043f6de

View file

@ -41,7 +41,7 @@ pub static POSITIVE: Lazy<Regex> =
.expect("POSITIVE regex") .expect("POSITIVE regex")
}); });
pub static NEGATIVE: Lazy<Regex> = pub static NEGATIVE: Lazy<Regex> =
Lazy::new(|| Regex::new(r#"-ad-|hidden|^hid$| hid$| hid |^hid"#).expect("NEGATIVE 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> = pub static TITLE_SEPARATOR: Lazy<Regex> =
Lazy::new(|| Regex::new(r#"[-|\\/>»]"#).expect("TITLE_SEPARATOR regex")); Lazy::new(|| Regex::new(r#"[-|\\/>»]"#).expect("TITLE_SEPARATOR regex"));