|
@@ -7,7 +7,7 @@ def extract_email(content):
|
|
|
"""
|
|
|
try:
|
|
|
pattern = r"([a-z0-9]+@[a-z]+\.[a-z]{2,3})"
|
|
|
- return re.search(pattern, content).groups()[0]
|
|
|
+ return re.search(pattern, content).group()
|
|
|
except:
|
|
|
return "None"
|
|
|
|
|
@@ -72,8 +72,9 @@ def extract_name(content):
|
|
|
"""
|
|
|
Returns the name of the expert
|
|
|
"""
|
|
|
- pattern = r"(\w+\s\w+.*?)Resume"
|
|
|
+ # pattern = r"(\w+\s\w+.*?)Resume" Old pattern
|
|
|
+ pattern = r"(RESUME|\SResume)\s(\w+\s\w+\.?\s\w+)|\-(\s.*?)Resume"
|
|
|
try:
|
|
|
- return re.search(pattern, content).groups()[0]
|
|
|
+ return re.search(pattern, content).group()
|
|
|
except:
|
|
|
return "None"
|