Fix: [EN] Handle OCR error on daily quests

This commit is contained in:
LmeSzinc 2023-09-17 05:43:28 +08:00
parent 488f6c814d
commit 59b3c59f99
2 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,8 @@ class TrailblazePowerOcr(DigitCounter):
# The trailblaze power icon is recognized as 买
# OCR_TRAILBLAZE_POWER includes the icon because the length varies by value
result = re.sub(r'[买米装:()]', '', result)
# 61240 -> 6/240
result = re.sub(r'1240$', '/240', result)
return result

View File

@ -39,6 +39,12 @@ class DailyQuestOcr(Ocr):
result = "进行中"
if "已领取" in result:
result = "已领取"
if self.lang == 'en':
result = result.replace('wor(d', 'world')
if "progress" in result.lower():
result = "In Progress"
if "claimed" in result.lower():
result = "Claimed"
return result