fixed seafile url

This commit is contained in:
Roy Olav Purser 2021-09-07 15:01:17 +02:00
parent 2458d6f2f5
commit 2909e14fe4
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -13,6 +13,10 @@ for(let i=0; i<process.argv.length; i++) {
}
if(url !== null) {
const search = new URLSearchParams();
search.set("dl", "1");
const direct = new URL(url);
direct.search = search.toString();
axios.get(url).then((resp) => {
const dom = cheerio.load(resp.data, {xmlMode: false});
const tags = dom('script').get();
@ -53,6 +57,7 @@ if(url !== null) {
data[prop.key.name] = prop.value.value;
}
}
data["rawPath"] = direct.href;
console.log(JSON.stringify(data));
})
});
}