Bunsly / JobSpy

Jobs scraper library for LinkedIn, Indeed, Glassdoor & ZipRecruiter
https://usejobspy.com
MIT License
825 stars 155 forks source link

Zip Recruiter not working with from the EU #190

Closed maxharrison closed 1 month ago

maxharrison commented 1 month ago

Am running the intial demo from a UK IP address, and I am getting an error from Zip: 2024-08-25 12:09:12,990 - JobSpy - ERROR - ZipRecruiter response status code 403 with response: {"status_code":403,"error_message":"This app is not available in the European Union, which enforces the General Data Protection Regulation (GDPR). Because of this regulation, ZipRecruiter cannot provide access at this time.","error_code":"geoblocked-gdpr","request_id":"CFRAY:8b8b20eb4e2171c0-IAD"}

This is the code I am running:

from jobspy import scrape_jobs

jobs = scrape_jobs(
    site_name=["indeed", "linkedin", "zip_recruiter", "glassdoor"],
    search_term="software engineer",
    location="Dallas, TX",
    results_wanted=20,
    hours_old=72, # (only Linkedin/Indeed is hour specific, others round up to days old)
    country_indeed='USA',  # only needed for indeed / glassdoor

    # linkedin_fetch_description=True # get full description , direct job url , company industry and job level (seniority level) for linkedin (slower)
    # proxies=["208.195.175.46:65095", "208.195.175.45:65095", "localhost"],

)
print(f"Found {len(jobs)} jobs")
print(jobs.head())

I have no issues accessing the website from a browser from the same IP.

cullenwatson commented 1 month ago

interesting, ziprecruiter must block eu ips from the api but not the website

haydenthai commented 1 month ago

To OP: I'd recommend creating an AWS account and you can run a t2-micro EC2 instance for free and run it there, as cullen mentioned EU ips are blocked from the API. Adding a proxy server would work as well.