From 3fa7d097fe9b9482ba5c089655385866adf2e8d3 Mon Sep 17 00:00:00 2001 From: Eriks Karls Date: Mon, 5 Aug 2019 11:55:39 +0300 Subject: [PATCH] =?UTF-8?q?Found=20awards=20switch=20to=20ASCII=20friendli?= =?UTF-8?q?er=20multiplier=20char=20-=20=E2=9C=95=20->=20x=20Localize=20ma?= =?UTF-8?q?x=20div=20end=20time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erepublik/citizen.py | 4 ++-- erepublik/classes.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erepublik/citizen.py b/erepublik/citizen.py index 37fa0a7..eb0dc46 100644 --- a/erepublik/citizen.py +++ b/erepublik/citizen.py @@ -256,7 +256,7 @@ class Citizen(classes.CitizenAPI): continue if data: - msgs = ["{count} ✕ {kind}, totaling {} {currency}\n" + msgs = ["{count} x {kind}, totaling {} {currency}\n" "{about}".format(d["count"] * d["reward"], **d) for d in data.values()] self.write_log("Found awards: {}".format("\n".join(msgs))) @@ -1872,7 +1872,7 @@ class Citizen(classes.CitizenAPI): def write_on_country_wall(self, message: str) -> bool: self._get_main() - post_to_wall_as = re.findall(r"""id="post_to_country_as".*?.*""", + post_to_wall_as = re.findall(r'id="post_to_country_as".*?.*', self.r.text, re.S | re.M) r = self._post_country_post_create(message, max(post_to_wall_as, key=int) if post_to_wall_as else 0) return r.json() diff --git a/erepublik/classes.py b/erepublik/classes.py index 29a9251..a673afa 100644 --- a/erepublik/classes.py +++ b/erepublik/classes.py @@ -1042,7 +1042,7 @@ class Battle(object): if data.get('end'): end = datetime.datetime.fromtimestamp(data.get('end'), tz=utils.erep_tz) else: - end = datetime.datetime.max + end = utils.localize_dt(utils.good_timedelta(datetime.datetime.max, datetime.timedelta(days=1))) battle_div = BattleDivision( end=end, epic=data.get('epic_type') in [1, 5],