View Single Post
Old 04.10.2019, 12:48
mgpai mgpai is offline
Script Master
Join Date: Sep 2013
Posts: 715

Originally Posted by Demongornot View Post
... So I am out of idea about how to analyse only the latest links and already existing ones in a CPU and memory usage friendly way...
Can use this method to get new links added by a crawler job.

// Get links from finished crawljob
// Trigger: Remote API Event fired

if (event.publisher == "linkcrawler" && == "FINISHED") {
    var jobId = JSON.parse(;
    var isJobRunning = function() {
        return callAPI("linkgrabberv2", "queryLinkCrawlerJobs", {
            "collectorInfo": true,
            "jobIds": [jobId]
        }).some(function(job) {
            return job.crawling || job.checking;

    while (isJobRunning()) sleep(5000);

    callAPI("linkgrabberv2", "queryLinks", {
        "jobUUIDs": [jobId]
    }).forEach(function(apiLink) {
        var link = getCrawledLinkByUUID(apiLink.uuid);
Reply With Quote