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