mirror of
https://github.com/Bunsly/JobSpy.git
synced 2026-03-07 04:54:32 -08:00
[fix] util func
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user