|
|
|
@ -155,7 +155,7 @@ pub struct IframelyResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn fetch_iframely(url: &str) -> Result<IframelyResponse, failure::Error> {
|
|
|
|
|
let fetch_url = format!("http://lemmy_iframely:8061/oembed?url={}", url);
|
|
|
|
|
let fetch_url = format!("http://iframely/oembed?url={}", url);
|
|
|
|
|
let text = chttp::get(&fetch_url)?.text()?;
|
|
|
|
|
let res: IframelyResponse = serde_json::from_str(&text)?;
|
|
|
|
|
Ok(res)
|
|
|
|
@ -169,7 +169,7 @@ pub struct PictshareResponse {
|
|
|
|
|
|
|
|
|
|
pub fn fetch_pictshare(image_url: &str) -> Result<PictshareResponse, failure::Error> {
|
|
|
|
|
let fetch_url = format!(
|
|
|
|
|
"http://lemmy_pictshare/api/geturl.php?url={}",
|
|
|
|
|
"http://pictshare/api/geturl.php?url={}",
|
|
|
|
|
utf8_percent_encode(image_url, NON_ALPHANUMERIC)
|
|
|
|
|
);
|
|
|
|
|
let text = chttp::get(&fetch_url)?.text()?;
|
|
|
|
|