[fix] util func

This commit is contained in:
Cullen Watson
2023-09-28 18:33:14 -05:00
parent c676050dc0
commit bff39a2625
4 changed files with 27 additions and 4 deletions

View File

@@ -27,7 +27,12 @@ from ...jobs import (
JobType,
)
from .. import Scraper, ScraperInput, Site
from ...utils import extract_emails_from_text
def extract_emails_from_text(text: str) -> Optional[list[str]]:
if not text:
return None
email_regex = re.compile(r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}")
return email_regex.findall(text)
class IndeedScraper(Scraper):