use futures::stream::StreamExt; use extrablatt::{Article, Extrablatt}; #[tokio::main] async fn main() -> Result<(), Box> { //! use futures::stream::StreamExt; //! async fn main() -> Result<(), Box> { //! let mut stream = extrablatt::Category::new("https://some-news.com/sports".parse().unwrap()) //! .into_stream() //! .await?; //! while let Some(article) = stream.next().await { //! //... //! } //! Ok(()) //! } let article = Article::get( "https://www.nytimes.com/2020/08/22/us/politics/george-bush-comeback-dukakis.html", ) .await?; dbg!(article.content); // println!("{}", article.content.text.unwrap()); Ok(()) }