mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-09 00:45:31 +02:00
refactor & more testing
This commit is contained in:
parent
7ae98904d4
commit
e3246af28b
14 changed files with 1969 additions and 101 deletions
|
@ -32,8 +32,7 @@ impl Article {
|
|||
.map(|doc| doc.to_string_with_options(options))
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn save_html(&self, path: &PathBuf) -> Result<(), Error> {
|
||||
pub fn save_html(&self, path: &PathBuf) -> Result<(), Error> {
|
||||
if let Some(ref html) = self.get_content() {
|
||||
if let Ok(()) = std::fs::create_dir_all(path) {
|
||||
let mut file_name = match self.title.clone() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue