Merged
Conversation
… job data extraction
…ove request handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates several company-specific job scraper scripts to use more modern and robust APIs, improves consistency in request formatting, and simplifies the extraction logic. The changes primarily focus on switching to JSON-based POST requests, updating endpoints, and cleaning up or refactoring the parsing logic for job listings.
API and Endpoint Updates:
sites/atkinsrealis.py: Switched from scraping HTML pages to using a JSON-based POST API (https://slihrms.wd3.myworkdayjobs.com/wday/cxs/slihrms/Careers/jobs). The script now paginates using the API'soffsetandlimitfields and extracts job data directly from the JSON response, simplifying the code and improving reliability.sites/hcltechnologies.py: Migrated from scraping HTML to using the official recruiting API endpoint (https://careers.hcltech.com/services/recruiting/v1/jobs) with JSON payloads. The code now fetches and paginates jobs using the API, removing complex HTML parsing and city/county translation logic.sites/hm.py: Updated the job search request to use a JSON POST with correct headers and a more targeted payload for Romania jobs, improving accuracy and reliability.Request Formatting and Consistency:
sites/goodyear.py: Adjusted the order of location IDs in thepost_datapayload for consistency and corrected the logic for extracting theremotefield from job data. [1] [2]sites/hm.py: Added proper request headers (Content-TypeandUser-Agent) for the POST request to ensure compatibility with the API.Code Simplification and Cleanup:
sites/atkinsrealis.py&sites/hcltechnologies.py: Removed unused imports and legacy code related to HTML parsing, city/county translation, and manual pagination, resulting in cleaner and more maintainable scripts. [1] [2]These changes collectively modernize the scrapers, making them more robust against website changes and easier to maintain.