Skip to content

Commit 8cee6e5

Browse files
Paul McInnisPaulMcInnis
authored andcommitted
Removed misleading ERROR level messages regarding bad description by preventing job validation when we are exluding it by filtration
1 parent 7a86277 commit 8cee6e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jobfunnel/backend/scrapers/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ def scrape_job(self, job_soup: BeautifulSoup, delay: float,
272272
# Scrape the data for the post, requiring a minimum of info...
273273
# NOTE: if we perform a self.session.get we may get respectfully delayed
274274
job = None # type: Optional[Job]
275+
invalid_job = False # type: bool
275276
job_init_kwargs = self.job_init_kwargs # NOTE: faster?
276277
for is_get, field in self._actions_list:
277278

@@ -293,6 +294,7 @@ def scrape_job(self, job_soup: BeautifulSoup, delay: float,
293294
"Cancelled scraping of %s, failed JobFilter",
294295
job.key_id
295296
)
297+
invalid_job = True
296298
break
297299

298300
# Respectfully delay if it's configured to do so.
@@ -338,7 +340,7 @@ def scrape_job(self, job_soup: BeautifulSoup, delay: float,
338340
)
339341

340342
# Validate job fields if we got something
341-
if job:
343+
if job and not invalid_job:
342344
try:
343345
job.validate()
344346
except Exception as err:

0 commit comments

Comments
 (0)