From 8c61a5993a54b8334528180bdd4915cd0dd3392a Mon Sep 17 00:00:00 2001 From: rusinthread Date: Fri, 23 Dec 2016 02:59:36 +0300 Subject: remove old obsolete code --- main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index e87122d..4b8e0ac 100755 --- a/main.py +++ b/main.py @@ -80,7 +80,7 @@ def clean_string(s, remove_junk=False): return s -def decode(s, optimize=False): +def decode(s): buf = '' for word in s.split(' '): word = word.strip() @@ -92,8 +92,7 @@ def decode(s, optimize=False): else: letter = word[0] buf += letter - if optimize: - buf = re.sub(r'ппв', '', buf, flags=re.I) + return buf def main(): @@ -117,7 +116,7 @@ def main(): print(obj['text']) print_colored(text, 'green', fallback_prefix='[CLEANED] ') - print_colored(decode(text, optimize=False), 'cyan', fallback_prefix='[DECODED] ') + print_colored(decode(text), 'cyan', fallback_prefix='[DECODED] ') if 'pic' in obj: pic = obj['pic'] if isinstance(obj['pic'], list) else [obj['pic']] -- cgit v1.2.3