Reads comma as seperation in answer
Closed this issue · 18 comments
The answer is sopesed to be "No, I cannot do it at all." but instead it just does "No".
that's an issue with it splitting by commas, with the fully automatic version it should learn from its mistakes
there isn't really a way to get it to work without splitting by commas or semi-colons, so questions with either of those two characters can be inaccurate
but when i run fully automatic it flags my account and reports suspisious activity
ken created version 2 for that, so try using that and see how it goes, if not u might just have to manually enter that one
i cant work out how install V2
is there a way i can edit the code to make it wait half a second or a second before submiting the answer
also i when int the code and deleted line 28 so it only splits the aswers with semi colons
if you could tell me how to make it wait a bit in full auto answer so it doesn't break that would be great :)
yeah I made it also split at commas because for the questions I checked, I had to split by commas to avoid incorrect answers...
i guess the formatting on EP is just really wank and inconsistent
you can make it wait by adding an async sleep in the while loop in answerLoop()
First, add this function somewhere within the file:
async function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
then add one line in answerLoop()
(here is the entire function, the new line is near the bottom):
// main function that continually answers questions until completion modal pops up or hotkey pressed again
async function answerLoop() {
if (TOGGLE) throw Error("Tried to initiate answerLoop while it is already running");
TOGGLE = true;
console.log("answerLoop entered.");
while (TOGGLE) {
let question = await page.$eval(DIR.question_css, el => el.textContent);
let answer = findAnswer(question);
await page.click(DIR.answer_box_css, {clickCount: 3});
page.keyboard.sendCharacter(answer);
page.keyboard.press('Enter');
// special case: modal pops up
if (await page.$(DIR.modal_css)) {
// incorrect answer and modal pops up; initiate answer-correction procedure
if (await page.$(DIR.modal_question_css) !== null) {
await correctAnswer(question, answer);
await deleteModals();
// list complete; clicks button to exit
} else if (await page.$(DIR.exit_button_css)) {
await page.click(DIR.exit_button_css);
break;
} else if (await page.$(DIR.exit_continue_button_css)) {
await page.click(DIR.exit_continue_button_css);
break;
} else {
// no idea what the modal is for so let's just pretend it doesn't exist
await deleteModals();
}
}
// ADD THIS LINE
await sleep(500);
// ADD THIS LINE
}
await deleteModals();
console.log('answerLoop Exited.');
}
500 is 500 milliseconds of waiting time; adjust as necessary
so yeah, puppeteer is installed, but you have cd into the directory with the js file you downloaded and run it from there. You do seem to be on windows though, so you should just be able to run the start.cmd file
how do i download the file it just opens the code for it but wont download
worked it out
can i just add the same sleep command to v2 as i did to v1
the above is for v2, you can find sleep scripts for v1 in the closed issues
Thank you sooo much
:D