diff --git a/roktracker/kingdom/scanner.py b/roktracker/kingdom/scanner.py index 11a11ee..2da58c3 100644 --- a/roktracker/kingdom/scanner.py +++ b/roktracker/kingdom/scanner.py @@ -271,6 +271,11 @@ def scan_governor( if self.is_page_needed(1): self.state_callback("Scanning general page") + + # take screenshot before copying the name + self.adb_client.secure_adb_screencap().save(self.img_path / "gov_info.png") + image = load_cv2_img(self.img_path / "gov_info.png", cv2.IMREAD_UNCHANGED) + if self.scan_options["Name"]: # nickname copy copy_try = 0 @@ -291,9 +296,6 @@ def scan_governor( # time.sleep(1.5 + random_delay()) - self.adb_client.secure_adb_screencap().save(self.img_path / "gov_info.png") - image = load_cv2_img(self.img_path / "gov_info.png", cv2.IMREAD_UNCHANGED) - # 1st image data (ID, Power, Killpoints, Alliance) with PyTessBaseAPI( path=str(self.tesseract_path), psm=PSM.SINGLE_WORD, oem=OEM.LSTM_ONLY