close

  
<div><p> </p>");
            },
          });
        }
    });
    
    acre.async.wait_on_results();

    if (null == results.viaf || null == results.lc) {
      continue;
    }
    
    var viaf_page = results.viaf.body;
    var lc_page = results.lc.body;
    
    var rex = new RegExp(match[1]);
    var viaf_match = rex.exec(viaf_page);
    var lc_match = rex.exec(lc_page);
    
    if (null == viaf_match) {
      rabj.submit_answer("VIAF nr key fixer", user.id, "queue_1309647654649_0", questions[i].questionid, "no", q[2]);
      acre.write("<p>viaf_match = null: " + questions[i].questionid + "</p>");
      acre.write("<p>" + JSON.stringify(q[1]) + "</p>");
    } else if (null == lc_match) {
      rabj.submit_answer("VIAF nr key fixer", user.id, "queue_1309647654649_0", questions[i].questionid, "no", q[1]);
      acre.write("<p>lc_match = null: " + questions[i].questionid + "</p>");
      acre.write("<p>" + JSON.stringify(q[1]) + "</p>");
    } else if (lc_match[0] != viaf_match[0]) {
      rabj.submit_answer("VIAF nr key fixer", user.id, "queue_1309647654649_0", questions[i].questionid, "yes", lc_match[0]);
      acre.write("<p>lc_match[0] != viaf_match[1]: " + questions[i].questionid + "</p>");
      acre.write("<p>" + lc_match[0] + "</p>");
      acre.write("<p>" + viaf_match[0] + "</p>");
    } else {
      rabj.submit_answer("VIAF nr key fixer", user.id, "queue_1309647654649_0", questions[i].questionid, "skip", "OK");
      acre.write("<p>OK: " + questions[i].questionid + "</p>");
      acre.write("<p>" + lc_match[0] + "</p>");
      acre.write("<p>" + viaf_match[0] + "</p>");
    }
  }


  
  
    
      
    </div>

Comments

Hide