mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +02:00
clippy regex escape
This commit is contained in:
parent
88bb88a38f
commit
97b194c9e8
1 changed files with 4 additions and 4 deletions
|
@ -8,25 +8,25 @@ static FINGERPRINT_REGEXES: Lazy<HashMap<&'static str, Regex>> = Lazy::new(|| {
|
||||||
m.insert(
|
m.insert(
|
||||||
"fingerprint.blogspot.com",
|
"fingerprint.blogspot.com",
|
||||||
regex::Regex::new(
|
regex::Regex::new(
|
||||||
r#"/\<meta\s*content=([\'"])blogger([\'"])\s*name=([\'"])generator([\'"])/i"#,
|
r#"/\\<meta\s*content=([\\'"])blogger([\\'"])\s*name=([\\'"])generator([\\'"])/i"#,
|
||||||
)
|
)
|
||||||
.expect("failed to build static regex"),
|
.expect("failed to build static regex"),
|
||||||
);
|
);
|
||||||
m.insert(
|
m.insert(
|
||||||
"fingerprint.blogspot.com",
|
"fingerprint.blogspot.com",
|
||||||
regex::Regex::new(
|
regex::Regex::new(
|
||||||
r#"/\<meta\s*name=([\'"])generator([\'"])\s*content=([\'"])Blogger([\'"])/i"#,
|
r#"/\\<meta\s*name=([\\'"])generator([\\'"])\s*content=([\\'"])Blogger([\\'"])/i"#,
|
||||||
)
|
)
|
||||||
.expect("failed to build static regex"),
|
.expect("failed to build static regex"),
|
||||||
);
|
);
|
||||||
m.insert(
|
m.insert(
|
||||||
"fingerprint.wordpress.com",
|
"fingerprint.wordpress.com",
|
||||||
regex::Regex::new(r#"/\<meta\s*name=([\'"])generator([\'"])\s*content=([\'"])WordPress/i"#)
|
regex::Regex::new(r#"/\\<meta\s*name=([\\'"])generator([\\'"])\s*content=([\\'"])WordPress/i"#)
|
||||||
.expect("failed to build static regex"),
|
.expect("failed to build static regex"),
|
||||||
);
|
);
|
||||||
m.insert(
|
m.insert(
|
||||||
"fingerprint.ippen.media",
|
"fingerprint.ippen.media",
|
||||||
regex::Regex::new(r#"/\<div\s*class=([\'"])id-SiteBEEPWrap([\'"])\>/i"#)
|
regex::Regex::new(r#"/\\<div\s*class=([\\'"])id-SiteBEEPWrap([\\'"])\\>/i"#)
|
||||||
.expect("failed to build static regex"),
|
.expect("failed to build static regex"),
|
||||||
);
|
);
|
||||||
m
|
m
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue