server: tweak cloudflare and prusa slurp config

This commit is contained in:
Bill Thiede 2024-09-12 10:06:46 -07:00
parent b06cbd1381
commit 47b1875022

View File

@ -180,10 +180,10 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
Selector::parse("div.entry-content").unwrap(),
],
"blog.prusa3d.com".to_string() => vec![
Selector::parse("article.content").unwrap(),
Selector::parse("article.content .post-block").unwrap(),
],
"blog.cloudflare.com".to_string() => vec![
Selector::parse(".author-lists").unwrap(),
Selector::parse(".author-lists .author-name-tooltip").unwrap(),
Selector::parse(".post-full-content").unwrap()
],
"engineering.fb.com".to_string() => vec![
@ -213,11 +213,11 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
Box::new(FrameImages),
Box::new(AddOutlink),
Box::new(EscapeHtml),
Box::new(InlineStyle),
Box::new(SanitizeHtml {
cid_prefix: "",
base_url: &link,
}),
Box::new(InlineStyle),
];
for t in body_tranformers.iter() {
if t.should_run(&link, &body) {