From c46c0242a24c564701dfb9675e442bcfcb42e4de Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 4 Jul 2021 23:37:08 +0200 Subject: [PATCH] fix: Case where GJO/CSET-foretelll cookies are outdated and the program enters an infinite loop is now fixed. --- src/platforms/csetforetell-fetch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platforms/csetforetell-fetch.js b/src/platforms/csetforetell-fetch.js index 50115e7..60b61c7 100644 --- a/src/platforms/csetforetell-fetch.js +++ b/src/platforms/csetforetell-fetch.js @@ -126,6 +126,10 @@ async function fetchStats(questionUrl, cookie){ } function isEnd(html){ + if(html.includes("You need to sign in or sign up before continuing")){ + throw Error("You need to sign in or sign up before continuing") + } + let isEndBool = html.includes("No questions match your filter") if(isEndBool){ //console.log(html)