diff --git a/src/index.js b/src/index.js index f423bd9..3f3dd1e 100644 --- a/src/index.js +++ b/src/index.js @@ -76,5 +76,5 @@ let commandLineUtility = async () => { // console.log("1") // console.log(process.argv) -// commandLineUtility() +commandLineUtility() // doEverything() \ No newline at end of file diff --git a/src/platforms/csetforetell-fetch.js b/src/platforms/csetforetell-fetch.js index 4750ea4..72d02ac 100644 --- a/src/platforms/csetforetell-fetch.js +++ b/src/platforms/csetforetell-fetch.js @@ -41,7 +41,7 @@ async function fetchPage(page, cookie){ }), }) .then(res => res.data) - //console.log(response) + // console.log(response) return response } @@ -92,7 +92,7 @@ async function fetchStats(questionUrl, cookie){ let descriptionprocessed1 = descriptionraw.split(`">`)[0] let descriptionprocessed2 = descriptionprocessed1.replace(">", "") let descriptionprocessed3 = descriptionprocessed2.replace("To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.", ``) - console.log(descriptionprocessed3) + // console.log(descriptionprocessed3) let descriptionprocessed4=descriptionprocessed3.replaceAll("\r\n\r\n", "\n") let descriptionprocessed5=descriptionprocessed4.replaceAll("\n\n", "\n") let descriptionprocessed6=descriptionprocessed5.replaceAll(""", `"`) @@ -101,11 +101,11 @@ async function fetchStats(questionUrl, cookie){ let description = descriptionprocessed8 // Number of forecasts let numforecasts = response.split("prediction_sets_count":")[1].split(",")[0] - //console.log(numforecasts) + // console.log(numforecasts) // Number of predictors let numforecasters = response.split("predictors_count":")[1].split(",")[0] - //console.log(numpredictors) + // console.log(numpredictors) let result = { "description": description, @@ -137,9 +137,9 @@ export async function csetforetell(){ let response = await fetchPage(i, cookie) let results = [] let init = Date.now() - console.log("Downloading... This might take a couple of minutes. Results will be shown.") + // console.log("Downloading... This might take a couple of minutes. Results will be shown.") while(!isEnd(response)){ - console.log(`Page #${i}`) + // console.log(`Page #${i}`) let htmlLines = response.split("\n") let h4elements = htmlLines.filter(str => str.includes("