utf8_percent_encode(image_url, NON_ALPHANUMERIC)
);
let text = isahc::get(&fetch_url)?.text()?;
- println!("--------------{}", text);
let res: PictshareResponse = serde_json::from_str(&text)?;
Ok(res)
}
Some(url) => match fetch_pictshare(&url) {
// Try to generate a small thumbnail if iframely is not supported
Ok(res) => {
- let mut split_url: Vec<&str> = res.url.split("/").collect();
+ let mut split_url: Vec<&str> = res.url.split('/').collect();
split_url.insert(split_url.len() - 1, "192");
Some(split_url.join("/"))
}