ziprecruiter: 5s delay

pull/64/head v1.1.17
Cullen 2023-10-28 16:41:32 -05:00
parent d3bfdc0a6e
commit 216d3fd39f
1 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ jobspy.scrapers.ziprecruiter
This module contains routines to scrape ZipRecruiter. This module contains routines to scrape ZipRecruiter.
""" """
import math import math
import json import time
import re import re
from datetime import datetime, date from datetime import datetime, date
from typing import Optional, Tuple, Any from typing import Optional, Tuple, Any
@ -68,9 +68,11 @@ class ZipRecruiterScraper(Scraper):
raise ZipRecruiterException("bad proxy") raise ZipRecruiterException("bad proxy")
raise ZipRecruiterException(str(e)) raise ZipRecruiterException(str(e))
time.sleep(5)
response_data = response.json() response_data = response.json()
jobs_list = response_data.get("jobs", []) jobs_list = response_data.get("jobs", [])
next_continue_token = response_data.get('continue', None) next_continue_token = response_data.get('continue', None)
print(len(jobs_list))
with ThreadPoolExecutor(max_workers=10) as executor: with ThreadPoolExecutor(max_workers=10) as executor:
job_results = [ job_results = [
@ -137,7 +139,6 @@ class ZipRecruiterScraper(Scraper):
else: else:
date_posted = date.today() date_posted = date.today()
return JobPost( return JobPost(
title=title, title=title,
company_name=company, company_name=company,