mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-08 08:30:00 +02:00
fmt
This commit is contained in:
parent
66de57731d
commit
34eaf1eeb1
2 changed files with 4 additions and 7 deletions
|
@ -1,8 +1,8 @@
|
||||||
mod article;
|
mod article;
|
||||||
mod config;
|
mod config;
|
||||||
mod error;
|
mod error;
|
||||||
mod youtube;
|
|
||||||
pub mod images;
|
pub mod images;
|
||||||
|
mod youtube;
|
||||||
|
|
||||||
use self::error::{ScraperError, ScraperErrorKind};
|
use self::error::{ScraperError, ScraperErrorKind};
|
||||||
use crate::article::Article;
|
use crate::article::Article;
|
||||||
|
@ -844,10 +844,7 @@ mod tests {
|
||||||
#[tokio::test(basic_scheduler)]
|
#[tokio::test(basic_scheduler)]
|
||||||
async fn youtube() {
|
async fn youtube() {
|
||||||
let config_path = PathBuf::from(r"./resources/tests/");
|
let config_path = PathBuf::from(r"./resources/tests/");
|
||||||
let url = url::Url::parse(
|
let url = url::Url::parse("https://www.youtube.com/watch?v=lHRkYLcmFY8").unwrap();
|
||||||
"https://www.youtube.com/watch?v=lHRkYLcmFY8",
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let grabber = ArticleScraper::new(config_path);
|
let grabber = ArticleScraper::new(config_path);
|
||||||
let article = grabber.parse(url, false, &Client::new()).await.unwrap();
|
let article = grabber.parse(url, false, &Client::new()).await.unwrap();
|
||||||
|
|
|
@ -16,7 +16,7 @@ impl Youtube {
|
||||||
author: None,
|
author: None,
|
||||||
url: url.clone(),
|
url: url.clone(),
|
||||||
html: Some(html),
|
html: Some(html),
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue