|
@@ -7,7 +7,7 @@ def extract_email(content):
|
|
"""
|
|
"""
|
|
try:
|
|
try:
|
|
pattern = r"([a-z0-9]+@[a-z]+\.[a-z]{2,3})"
|
|
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:
|
|
except:
|
|
return "None"
|
|
return "None"
|
|
|
|
|
|
@@ -72,8 +72,9 @@ def extract_name(content):
|
|
"""
|
|
"""
|
|
Returns the name of the expert
|
|
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:
|
|
try:
|
|
- return re.search(pattern, content).groups()[0]
|
|
|
|
|
|
+ return re.search(pattern, content).group()
|
|
except:
|
|
except:
|
|
return "None"
|
|
return "None"
|