mirror of https://github.com/Bunsly/JobSpy
fix(jobs): add 1 to loop counter
parent
a5920ddc52
commit
2a96fdc8a5
|
@ -89,6 +89,7 @@ class IndeedScraper(Scraper):
|
|||
)
|
||||
|
||||
for job in jobs["metaData"]["mosaicProviderJobCardsModel"]["results"]:
|
||||
processed_jobs += 1
|
||||
job_url = f'{self.job_url}{job["jobkey"]}'
|
||||
if job_url in seen_urls:
|
||||
continue
|
||||
|
@ -135,7 +136,10 @@ class IndeedScraper(Scraper):
|
|||
job_url=job_url,
|
||||
)
|
||||
job_list.append(job_post)
|
||||
if len(job_list) >= scraper_input.results_wanted:
|
||||
if (
|
||||
len(job_list) >= scraper_input.results_wanted
|
||||
or processed_jobs >= total_num_jobs
|
||||
):
|
||||
break
|
||||
|
||||
if (
|
||||
|
|
|
@ -74,6 +74,7 @@ class LinkedInScraper(Scraper):
|
|||
"div",
|
||||
class_="base-card relative w-full hover:no-underline focus:no-underline base-card--link base-search-card base-search-card--link job-search-card",
|
||||
):
|
||||
processed_jobs += 1
|
||||
data_entity_urn = job_card.get("data-entity-urn", "")
|
||||
job_id = (
|
||||
data_entity_urn.split(":")[-1] if data_entity_urn else "N/A"
|
||||
|
@ -113,7 +114,10 @@ class LinkedInScraper(Scraper):
|
|||
job_url=job_url,
|
||||
)
|
||||
job_list.append(job_post)
|
||||
if len(job_list) >= scraper_input.results_wanted:
|
||||
if (
|
||||
len(job_list) >= scraper_input.results_wanted
|
||||
or processed_jobs >= job_count
|
||||
):
|
||||
break
|
||||
if (
|
||||
len(job_list) >= scraper_input.results_wanted
|
||||
|
|
|
@ -114,7 +114,10 @@ class ZipRecruiterScraper(Scraper):
|
|||
job_url=job_url,
|
||||
)
|
||||
job_list.append(job_post)
|
||||
if len(job_list) >= scraper_input.results_wanted:
|
||||
if (
|
||||
len(job_list) >= scraper_input.results_wanted
|
||||
or processed_jobs >= job_count
|
||||
):
|
||||
break
|
||||
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue