publish eve_rock_watcher.py
This commit is contained in:
parent
c356fc4fd3
commit
97397ecb37
1 changed files with 5 additions and 1 deletions
|
|
@ -106,7 +106,11 @@ def read_selected_quantity(cp):
|
||||||
digits = re.sub(r"\D", "", m.group(1))
|
digits = re.sub(r"\D", "", m.group(1))
|
||||||
if len(digits) < 2:
|
if len(digits) < 2:
|
||||||
return None, None
|
return None, None
|
||||||
ore = match_ore(flat.lower()) or "rock"
|
# the rock's name sits just before its 'Quantity' line in the same popup block
|
||||||
|
# (e.g. "Omber Distance ... Quantity 47,765 Units") — match there, not the whole
|
||||||
|
# window (the hold's "Compressed Kernite" would otherwise win).
|
||||||
|
ore = match_ore(flat[max(0, m.start() - 180):m.start()].lower()) \
|
||||||
|
or match_ore(flat.lower()) or "rock"
|
||||||
return int(digits), ore
|
return int(digits), ore
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue