mirror of
https://github.com/karl0ss/JDRssDownloader.git
synced 2025-04-26 19:39:22 +01:00
split files names out for logs
This commit is contained in:
parent
2df901b47e
commit
a2f3a9ee69
@ -1,12 +1,16 @@
|
||||
function checkFileName(urls) {
|
||||
let urlList = []
|
||||
let urlObj = {
|
||||
"fileName": "",
|
||||
"urlList": []
|
||||
}
|
||||
urls.forEach(url => {
|
||||
let cut = url.match(/([^\/]*$)/mg);
|
||||
if (cut[0] !== '') {
|
||||
urlList.push(url)
|
||||
urlObj.fileName = cut[0].replace('.html', '')
|
||||
urlObj.urlList.push(url)
|
||||
}
|
||||
});
|
||||
return urlList
|
||||
return urlObj
|
||||
}
|
||||
|
||||
module.exports = { checkFileName }
|
Loading…
x
Reference in New Issue
Block a user