use wget to download maps
This commit is contained in:
parent
755e1d4d5b
commit
694440bd29
16
src/main.rs
16
src/main.rs
@ -62,7 +62,21 @@ fn get_scripts(dom:rbx_dom_weak::WeakDom) -> Vec<rbx_dom_weak::Instance>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn download(map_list: Vec<u64>) -> Result<(), Box<dyn std::error::Error>>{
|
fn download(map_list: Vec<u64>) -> Result<(), Box<dyn std::error::Error>>{
|
||||||
unimplemented!()
|
let header=format!("Cookie: .ROBLOSECURITY={}",std::env::var("RBXCOOKIE")?);
|
||||||
|
let shared_args=&[
|
||||||
|
"-q",
|
||||||
|
"--header",
|
||||||
|
header.as_str(),
|
||||||
|
"-O",
|
||||||
|
];
|
||||||
|
for map_id in map_list.iter() {
|
||||||
|
std::process::Command::new("wget")
|
||||||
|
.args(shared_args)
|
||||||
|
.arg(format!("maps/unprocessed/{}.rbxl",map_id))
|
||||||
|
.arg(format!("https://assetdelivery.roblox.com/v1/asset/?ID={}",map_id))
|
||||||
|
.spawn()?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
fn scan() -> Result<(), Box<dyn std::error::Error>>{
|
fn scan() -> Result<(), Box<dyn std::error::Error>>{
|
||||||
let mut id = 0u32;
|
let mut id = 0u32;
|
||||||
|
Loading…
Reference in New Issue
Block a user