Fixed problem with cset-foretell probabilities
This commit is contained in:
parent
f69814d8e7
commit
9831c86674
|
@ -44,6 +44,7 @@ async function fetchStats(questionUrl, cookie){
|
||||||
|
|
||||||
// Is binary?
|
// Is binary?
|
||||||
let isbinary = response.includes("binary?":true")
|
let isbinary = response.includes("binary?":true")
|
||||||
|
// console.log(`is binary? ${isbinary}`)
|
||||||
let options = []
|
let options = []
|
||||||
if(isbinary){
|
if(isbinary){
|
||||||
// Crowd percentage
|
// Crowd percentage
|
||||||
|
@ -62,7 +63,7 @@ async function fetchStats(questionUrl, cookie){
|
||||||
type: "PROBABILITY"
|
type: "PROBABILITY"
|
||||||
}))
|
}))
|
||||||
}else{
|
}else{
|
||||||
let optionsBody = response.split("tbody")[1]
|
let optionsBody = response.split("tbody")[3] // Previously [1], but they added a new table.
|
||||||
// console.log(optionsBody)
|
// console.log(optionsBody)
|
||||||
let optionsHtmlElement = "<table" + optionsBody + "table>"
|
let optionsHtmlElement = "<table" + optionsBody + "table>"
|
||||||
let tablesAsJson = Tabletojson.convert(optionsHtmlElement)
|
let tablesAsJson = Tabletojson.convert(optionsHtmlElement)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user