Added more throtlling when fetching from metaculus

This commit is contained in:
NunoSempere 2021-06-08 15:00:11 +02:00
parent 2ca3815de1
commit ffbd09416d
2 changed files with 9 additions and 11 deletions

View File

@ -79,7 +79,7 @@ export async function metaculus() {
(now < result.resolve_time) (now < result.resolve_time)
) { ) {
// console.log(result) // console.log(result)
await sleep(1000) await sleep(5000)
let questionPage = await fetchMetaculusQuestionDescription(result.page_url) let questionPage = await fetchMetaculusQuestionDescription(result.page_url)
let descriptionraw = questionPage.split(`<div class="question__content">`)[1] let descriptionraw = questionPage.split(`<div class="question__content">`)[1]
let descriptionprocessed1 = descriptionraw.split("</div>")[0] let descriptionprocessed1 = descriptionraw.split("</div>")[0]

View File

@ -14,5 +14,3 @@ export async function mergeEverything(){
await upsert( mergedprocessed,"metaforecasts") await upsert( mergedprocessed,"metaforecasts")
console.log("Done") console.log("Done")
} }