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?
|
||||
let isbinary = response.includes("binary?":true")
|
||||
// console.log(`is binary? ${isbinary}`)
|
||||
let options = []
|
||||
if(isbinary){
|
||||
// Crowd percentage
|
||||
|
@ -62,7 +63,7 @@ async function fetchStats(questionUrl, cookie){
|
|||
type: "PROBABILITY"
|
||||
}))
|
||||
}else{
|
||||
let optionsBody = response.split("tbody")[1]
|
||||
let optionsBody = response.split("tbody")[3] // Previously [1], but they added a new table.
|
||||
// console.log(optionsBody)
|
||||
let optionsHtmlElement = "<table" + optionsBody + "table>"
|
||||
let tablesAsJson = Tabletojson.convert(optionsHtmlElement)
|
||||
|
|
Loading…
Reference in New Issue
Block a user