View Single Post
  #62  
Old 27.02.2020, 11:48
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 918
Default

Quote:
Originally Posted by RPNet-user View Post
Yes the latter one(all links).
Code:
// Export linkgrabber links
// Trigger: None (Click 'Test Run' button to execute)

var exportFolder = JD_HOME + "/auto/export/"; // <- Folder for exporting the text files
var now = new Date().toString().substring(4, 24).replace(/:/g, "."); // <- Timestamp used in file name
var exportFile = now + " - lingkrabber links.txt"; // <- Filename for exporting the URLs
var urls = [];

getAllCrawledLinks().forEach(function(link) {
    var fileName = link.getName();
    var downloadURL = link.getContentURL();
    urls.push(downloadURL + "," + fileName);
})

if (urls.length) {
    if (!getPath(exportFolder).exists()) getPath(exportFolder).mkdirs();
    writeFile(exportFolder + exportFile, urls.join("\r\n"), true);
}
Reply With Quote