From 9184069021e856745c143e75b0580032d31e2c86 Mon Sep 17 00:00:00 2001 From: NotoriousRebel Date: Fri, 15 Feb 2019 22:47:40 -0500 Subject: [PATCH] Fixed improper handles with 3 dots. --- discovery/twittersearch.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/discovery/twittersearch.py b/discovery/twittersearch.py index 06b02e16..86b8abb7 100644 --- a/discovery/twittersearch.py +++ b/discovery/twittersearch.py @@ -40,9 +40,12 @@ def get_people(self): if len(handle) > 2: if ' ' in handle.strip(): handle = handle.split(' ')[0] - # strip off period at the end of exists - if handle[len(handle)-1] == '.': - handle = handle[:len(handle)-1] + # strip off period at the end if exists + elif handle[len(handle) - 1] == '.': + handle = handle[:len(handle) - 1] + # strip periods if contains three of them + elif '...' in handle.strip(): + handle = handle[:handle.index('.')] handles.add(handle) return handles