From 7e7c14fe22b6ee0d442777382e12da65b7c9fd20 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 1 Oct 2022 11:43:16 +0200 Subject: [PATCH] fix bug in /live --- files/routes/static.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index dc73859e2..8391f4279 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -481,16 +481,19 @@ if SITE == 'pcmemes.net': quantity = int(y.group(1)) unit = y.group(2) - if unit.startswith('λεπτ'): + if unit.startswith('δε'): + unit = 'second' + modifier = 1/60 + elif unit.startswith('λεπτ'): unit = 'minute' modifier = 1 - if unit.startswith('ώρ'): + elif unit.startswith('ώρ'): unit = 'hour' modifier = 60 - if unit.startswith('ημέρ'): + elif unit.startswith('ημέρ'): unit = 'day' modifier = 1440 - if unit.startswith('εβδομάδ'): + elif unit.startswith('εβδομάδ'): unit = 'week' modifier = 10080 elif unit.startswith('μήν'): @@ -500,10 +503,7 @@ if SITE == 'pcmemes.net': unit = 'year' modifier = 525600 - try: minutes = quantity * modifier - except: - print(unit, flush=True) - return None + minutes = quantity * modifier actual = f'{quantity} {unit}' if quantity > 1: actual += 's'