mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +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 config;
|
||||
mod error;
|
||||
mod youtube;
|
||||
pub mod images;
|
||||
mod youtube;
|
||||
|
||||
use self::error::{ScraperError, ScraperErrorKind};
|
||||
use crate::article::Article;
|
||||
|
@ -844,10 +844,7 @@ mod tests {
|
|||
#[tokio::test(basic_scheduler)]
|
||||
async fn youtube() {
|
||||
let config_path = PathBuf::from(r"./resources/tests/");
|
||||
let url = url::Url::parse(
|
||||
"https://www.youtube.com/watch?v=lHRkYLcmFY8",
|
||||
)
|
||||
.unwrap();
|
||||
let url = url::Url::parse("https://www.youtube.com/watch?v=lHRkYLcmFY8").unwrap();
|
||||
|
||||
let grabber = ArticleScraper::new(config_path);
|
||||
let article = grabber.parse(url, false, &Client::new()).await.unwrap();
|
||||
|
|
|
@ -16,11 +16,11 @@ impl Youtube {
|
|||
author: None,
|
||||
url: url.clone(),
|
||||
html: Some(html),
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue