diff --git a/tetras_extraction/macao_12/script/extract_page.py b/tetras_extraction/macao_12/script/extract_page.py index 733a6e396bc230b01680e964cd2d72206a171f43..ff3711724697eef2714865cf4a7c1f5a7ca67f74 100644 --- a/tetras_extraction/macao_12/script/extract_page.py +++ b/tetras_extraction/macao_12/script/extract_page.py @@ -89,7 +89,7 @@ class RegexParser: m = re.match(r"var nr = (\d+);", line) if m is not None: # "index" line - index = int(m.group(1)) + index = int(m.group(1)) - 1 # question indexes start at 1 elif line == "exo.tabStylesR[nr] = CODE_F;": # "incorrect answer" line insert_grow(correct_choices, index, False, fill_value=False) @@ -153,7 +153,7 @@ class XpathParser: value = e.xpath("@value") if len(value) != 0: # "index line" - index = int(value[0]) + index = int(value[0]) - 1 # question indexes start at 1 else: # "correct" or "incorrect" line correct = e.get("name") == "CODE_V"