mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Remove useless import
This commit is contained in:
parent
bf92132e84
commit
a7bc93031a
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user