2023-07-25 10:50:00 +01:00
|
|
|
use crate::prelude::*;
|
|
|
|
|
2023-07-28 18:35:41 +01:00
|
|
|
use atom_syndication::Feed;
|
|
|
|
|
|
|
|
pub fn reqwest_blocking_get(url: &str) -> Result<Feed> {
|
2023-07-25 10:50:00 +01:00
|
|
|
let content = reqwest::blocking::get(url)?.bytes()?;
|
|
|
|
let channel = Feed::read_from(&content[..])?;
|
|
|
|
Ok(channel)
|
|
|
|
}
|