diff options
-rwxr-xr-x | main.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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']] |