diff --git a/server/src/lib.rs b/server/src/lib.rs index 5184091..47892c3 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -8,7 +8,7 @@ use std::{collections::HashMap, convert::Infallible, str::FromStr}; use async_trait::async_trait; use css_inline::{CSSInliner, InlineError, InlineOptions}; use linkify::{LinkFinder, LinkKind}; -use log::{error, info, warn}; +use log::{error, warn}; use lol_html::{ element, errors::RewritingError, html_content::ContentType, rewrite_str, text, RewriteStrSettings, @@ -141,7 +141,6 @@ impl Transformer for FrameImages { RewriteStrSettings { element_content_handlers: vec![ element!("img[data-src]", |el| { - info!("found image with data-src {el:?}"); let src = el .get_attribute("data-src") .unwrap_or("https://placehold.co/600x400".to_string()); @@ -150,7 +149,6 @@ impl Transformer for FrameImages { Ok(()) }), element!("img[data-cfsrc]", |el| { - info!("found image with data-cfsrc {el:?}"); let src = el .get_attribute("data-cfsrc") .unwrap_or("https://placehold.co/600x400".to_string()); @@ -159,7 +157,6 @@ impl Transformer for FrameImages { Ok(()) }), element!("img[alt], img[title]", |el| { - info!("found image with alt or title {el:?}"); let src = el .get_attribute("src") .unwrap_or("https://placehold.co/600x400".to_string()); diff --git a/server/src/newsreader.rs b/server/src/newsreader.rs index f522389..6fda94d 100644 --- a/server/src/newsreader.rs +++ b/server/src/newsreader.rs @@ -179,6 +179,9 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result vec![ Selector::parse("div.entry-content").unwrap(), ], + "blog.prusa3d.com".to_string() => vec![ + Selector::parse("article.content").unwrap(), + ], "blog.cloudflare.com".to_string() => vec![ Selector::parse(".author-lists").unwrap(), Selector::parse(".post-full-content").unwrap()