1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-12-26 13:38:51 +00:00

Remove useless import

This commit is contained in:
Pierre HUBERT 2021-04-08 17:21:31 +02:00
parent bf92132e84
commit a7bc93031a

View File

@ -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<PostWebLink> {
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),