diff --git a/src/utils/webpage_utils.rs b/src/utils/webpage_utils.rs index 95704fa..9dd742d 100644 --- a/src/utils/webpage_utils.rs +++ b/src/utils/webpage_utils.rs @@ -6,7 +6,7 @@ use std::time::Duration; use webpage::{Webpage, WebpageOptions}; -use crate::data::error::{ExecError, Res}; +use crate::data::error::Res; use crate::data::post::PostWebLink; /// Attempt to get information about a URL given by a user @@ -19,10 +19,6 @@ pub fn get_post_web_link(url: &str) -> Res { let page = Webpage::from_url(url, options)?; - /*if !page.http.content_type.to_lowercase().starts_with("text/html") { - return Err(ExecError::boxed_string(format!("The page at {} as an invalid content type: {}!", url, page.http.content_type))); - }*/ - Ok(PostWebLink { url: url.to_string(), title: page.html.opengraph.properties.get("title").map(String::to_string),