mirror of https://github.com/Bunsly/JobSpy
parent
c676050dc0
commit
bff39a2625
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "python-jobspy"
|
||||
version = "1.1.9"
|
||||
version = "1.1.10"
|
||||
description = "Job scraper for LinkedIn, Indeed & ZipRecruiter"
|
||||
authors = ["Zachary Hampton <zachary@zacharysproducts.com>", "Cullen Watson <cullen@cullen.ai>"]
|
||||
homepage = "https://github.com/cullenwatson/JobSpy"
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -9,6 +9,7 @@ from datetime import datetime
|
|||
|
||||
import requests
|
||||
import time
|
||||
import re
|
||||
from requests.exceptions import ProxyError
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
from bs4 import BeautifulSoup
|
||||
|
@ -23,7 +24,13 @@ from ...jobs import (
|
|||
JobResponse,
|
||||
JobType,
|
||||
)
|
||||
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 LinkedInScraper(Scraper):
|
||||
|
@ -256,3 +263,9 @@ class LinkedInScraper(Scraper):
|
|||
)
|
||||
|
||||
return location
|
||||
|
||||
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)
|
|
@ -28,7 +28,12 @@ from ...jobs import (
|
|||
JobType,
|
||||
Country,
|
||||
)
|
||||
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 ZipRecruiterScraper(Scraper):
|
||||
|
|
Loading…
Reference in New Issue