mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +02:00
fmt
This commit is contained in:
parent
6964724102
commit
d93f5c9677
1 changed files with 3 additions and 2 deletions
|
@ -40,8 +40,9 @@ pub static POSITIVE: Lazy<Regex> =
|
||||||
).case_insensitive(true).build()
|
).case_insensitive(true).build()
|
||||||
.expect("POSITIVE regex")
|
.expect("POSITIVE regex")
|
||||||
});
|
});
|
||||||
pub static NEGATIVE: Lazy<Regex> =
|
pub static NEGATIVE: Lazy<Regex> = Lazy::new(|| {
|
||||||
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"));
|
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"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue