Skip to content

Commit e2829f4

Browse files
authored
lower case names before remove accents (#31)
Names that begin with accent characters were being removed in the lists
1 parent 4b52b0c commit e2829f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

linkedin2username.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@ def clean(raw_list):
596596
allowed_chars = re.compile('[^a-zA-Z -]')
597597
for name in raw_list:
598598

599+
# Lower-case everything to make it easier to de-duplicate.
600+
name = name.lower()
601+
599602
# Try to transform non-English characters below.
600603
name = remove_accents(name)
601604

@@ -604,9 +607,6 @@ def clean(raw_list):
604607
# People like to feel special, I guess.
605608
name = allowed_chars.sub('', name)
606609

607-
# Lower-case everything to make it easier to de-duplicate.
608-
name = name.lower()
609-
610610
# The line below tries to consolidate white space between words
611611
# and get rid of leading/trailing spaces.
612612
name = re.sub(r'\s+', ' ', name).strip()

0 commit comments

Comments
 (0)