Skip to content

Commit

Permalink
revise the logic within fetchfromdblpapi
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLee131 committed Dec 3, 2024
1 parent 37c9d99 commit 43369a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/fetchRank.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function fetchRank(node, title, authorA, year, site) {
version;

let cached = apiCache.getItem(query_url);
console.log("cached: ", cached);
// console.log("cached: ", cached);
if (cached) fetchFromCache(cached, node, title, authorA, year, site);
else fetchFromDblpApi(query_url, node, title, authorA, year, site);
}
Expand All @@ -26,13 +26,13 @@ function fetchFromCache(cached, node, title, authorA, year, site) {
let dblp_url = cached.dblp_url;
let resp = cached.resp;
let resp_flag = cached.flag;
console.log("dblp_url: ", dblp_url);
// console.log("dblp_url: ", dblp_url);

//Find a new vul: rankDB lacks of `tacas` etc., but it does occur in file `dataGen`.
if (typeof dblp_url == "undefined" && resp_flag != false) {
dblp_abbr = resp.hit[0].info.number;
if (typeof dblp_abbr != "undefined" && isNaN(dblp_abbr)) {
console.log("dblp_abbr: ", dblp_abbr);
// console.log("dblp_abbr: ", dblp_abbr);
} else {
dblp_abbr = resp.hit[0].info.venue;
}
Expand Down Expand Up @@ -221,8 +221,8 @@ function fetchFromDblpApi(query_url, node, title, authorA, year, site) {

else {
for (let getRankSpan of site.rankSpanList) {
// console.log("with url");
$(node).after(getRankSpan(dblp_url, "url"));
// console.log("with abbr");
$(node).after(getRankSpan(dblp_abbr, "abbr")); // I am not sure the difference between "abbr" and "url"
}
}

Expand Down

0 comments on commit 43369a0

Please sign in to comment.