mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 14:16:19 +00:00
usar curl lol
This commit is contained in:
parent
665110a2d6
commit
4d87fdbf25
1 changed files with 1 additions and 7 deletions
|
@ -122,14 +122,8 @@ for (const resource of datasetInfo.result.resources) {
|
|||
const dir = await mkdtemp("/tmp/sepa-precios-archiver-repackage-");
|
||||
console.info(dir);
|
||||
try {
|
||||
const response = await fetch(resource.url);
|
||||
if (!checkRes(response)) continue;
|
||||
// const response = Bun.file(
|
||||
// `/Users/diablo/Downloads/dump precios justos/${basename(resource.url)}`,
|
||||
// );
|
||||
|
||||
const zip = join(dir, "zip");
|
||||
await write(zip, response);
|
||||
await $`curl -L -o ${zip} ${resource.url}`;
|
||||
await $`unzip ${zip} -d ${dir}`;
|
||||
await rm(zip);
|
||||
|
||||
|
|
Loading…
Reference in a new issue