Skip to content

Commit 45a7ee5

Browse files
author
apetheory
committed
Fixed +1 bug when displaying the number of questions answered
1 parent 4d440a3 commit 45a7ee5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

answering.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_correct_answer(self, browser):
6666
browser.driver.find_element_by_xpath('/html/body/div[2]/div/div/div[2]/div[2]/div/div[1]/div/div[2]/div[4]/div[5]/a/div/div[2]').click()
6767

6868
self.question_answering_delay = random.randint(self.min_delay_interval,self.max_delay_interval)
69-
print(f'Delay set to {self.question_answering_delay+2} seconds. (Questions answered so far: {self.question_tracker})')
69+
print(f'Delay set to {self.question_answering_delay+2} seconds. (Questions answered so far: {self.question_tracker+1})')
7070
time.sleep(self.question_answering_delay+2)
7171

7272
#We loop through all the buttons and we find the one with a different color than blue (that is the correct answer)
@@ -80,7 +80,7 @@ def get_correct_answer(self, browser):
8080
def click_correct_button(self, browser, ans):
8181

8282
self.question_answering_delay = random.randint(self.min_delay_interval,self.max_delay_interval)
83-
print(f'Delay set to {self.question_answering_delay} seconds. (Questions answered so far: {self.question_tracker})')
83+
print(f'Delay set to {self.question_answering_delay} seconds. (Questions answered so far: {self.question_tracker+1})')
8484
time.sleep(self.question_answering_delay)
8585

8686
# Loop through every answer button and see which one matches with our potential answer

0 commit comments

Comments
 (0)