diff options
author | rusinthread <rusinthread@cock.li> | 2016-12-23 02:59:36 +0300 |
---|---|---|
committer | rusinthread <rusinthread@cock.li> | 2016-12-23 02:59:36 +0300 |
commit | 8c61a5993a54b8334528180bdd4915cd0dd3392a (patch) | |
tree | 934c3d9821b93d7ce1ca21feb067edc73f71a751 | |
parent | 278083d122bd6c89a70c0d55da636611926fb8ae (diff) |
remove old obsolete code
-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']] |