Skip to content

Commit

Permalink
refactor: update file paths for downloading in scibun.rs and scrape.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kremilly committed Jul 22, 2024
1 parent b5fbc50 commit 251857c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/addons/scibun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,12 @@ impl Scibun {
let lines_iter = io::Cursor::new(&data).lines();

for line_result in lines_iter {
let path = "scrape/";
let path = "packages/";
let url = line_result?;
let _ = fs::create_dir(&path);

Tasks::download(
None,
&url,
&path,
flags,
None, &url, &path, flags,
).await?;
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/addons/scrape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,11 @@ impl Scrape {
if !response.list.is_empty() {
for item in &response.list {
if !item.encrypted {
let path = "./";
let path = "scrape/";
let url = &item.url;

Tasks::download(
None,
url,
path,
flags,
None, url, path, flags,
).await?;
}
}
Expand Down

0 comments on commit 251857c

Please sign in to comment.