Stripped off from beginning.

This commit is contained in:
NotoriousRebel 2019-02-15 22:53:29 -05:00
parent b184016dac
commit 7409dc678f

View file

@ -36,15 +36,15 @@ def get_people(self):
# fix invalid handles that look like @user other_output # fix invalid handles that look like @user other_output
handles = set() handles = set()
for handle in to_parse: for handle in to_parse:
handle = str(handle) handle = str(handle).strip()
if len(handle) > 2: if len(handle) > 2:
if ' ' in handle.strip(): if ' ' in handle:
handle = handle.split(' ')[0] handle = handle.split(' ')[0]
# strip off period at the end if exists # strip off period at the end if exists
if handle[len(handle) - 1] == '.': if handle[len(handle) - 1] == '.':
handle = handle[:len(handle) - 1] handle = handle[:len(handle) - 1]
# strip periods if contains three of them # strip periods if contains three of them
if '...' in handle.strip(): if '...' in handle:
handle = handle[:handle.index('.')] handle = handle[:handle.index('.')]
handles.add(handle) handles.add(handle)
return handles return handles