diff --git a/src/lib.rs b/src/lib.rs index 01bf271..ce2f523 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -61,7 +61,7 @@ impl ArticleScraper { url: url::Url, download_images: bool, ) -> Result { - info!("Scraping article: {}", url.as_str()); + info!("Scraping article: '{}'", url.as_str()); let response = self .client .head(url.clone()) @@ -69,7 +69,7 @@ impl ArticleScraper { .await .map_err(|err| { error!( - "Failed head request to: {} - {}", + "Failed head request to: '{}' - '{}'", url.as_str(), err.description() ); @@ -80,7 +80,7 @@ impl ArticleScraper { // check if url redirects and we need to pick up the new url let mut url = url; if let Some(new_url) = ArticleScraper::check_redirect(&response) { - debug!("Url {} redirects to {}", url.as_str(), new_url.as_str()); + debug!("Url '{}' redirects to '{}'", url.as_str(), new_url.as_str()); url = new_url; } @@ -117,12 +117,12 @@ impl ArticleScraper { })?; if let Err(error) = ArticleScraper::prevent_self_closing_tags(&context) { - error!("Preventing self closing tags failed - {}", error); + error!("Preventing self closing tags failed - '{}'", error); return Err(error); } if let Err(error) = ArticleScraper::eliminate_noscrip_tag(&context) { - error!("Eliminating