1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-08 16:40:00 +02:00
This commit is contained in:
Jan Lukas Gernert 2022-12-11 16:23:02 +01:00
parent dc1bf2ef0c
commit 88bb88a38f
3 changed files with 17 additions and 24 deletions

View file

@ -16,7 +16,7 @@ pub struct Article {
impl Article {
pub fn save_html(&self, path: &PathBuf) -> Result<(), Error> {
if let Some(ref html) = self.html {
if let Ok(()) = std::fs::create_dir_all(&path) {
if let Ok(()) = std::fs::create_dir_all(path) {
let mut file_name = match self.title.clone() {
Some(file_name) => file_name.replace('/', "_"),
None => "Unknown Title".to_owned(),