Menu

#7 small upgrade

open
nobody
None
5
2005-11-13
2005-11-13
KomitlaK
No

This line in ogame.py in def __AggiornaListaPianeti(self):

re_pianeti = re.compile(
r"(?P<nome>[\w|\s]+)\s+(?P<posizione>\[\d+:\d+:\d+\])",
re.MULTILINE )

returns part of the messages from the overview page if
there are any. If you change the regular expression to

re_planets = re.compile(
r"(?:<option.*?>)(?P<nome>[\w|\s]+)\s+(?P<posizione>\[\d+:\d+:\d+\])",
re.MULTILINE )

it returns only the planet names and position, as
needed in the first place.

greetz

Discussion


Log in to post a comment.

MongoDB Logo MongoDB