feat: enhance person scraper with employment type extraction and grouped experience parsing#272
Open
miguelcostero wants to merge 1 commit intojoeyism:masterfrom
Conversation
…ped experience parsing - Add employment_type field to Experience model - Implement employment type detection from text parsing - Add support for grouped experiences (multiple roles under same company) - Refactor experience extraction into separate methods for main page and details page - Add fallback parsing strategies for different LinkedIn layouts - Introduce EMPLOYMENT_TYPE_MAP for normalization - Add comprehensive tests for grouped experiences parsing - Add pytest and pytest-asyncio to dependencies
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.
Summary
This PR enhances the
PersonScraperwith improved experience extraction capabilities:Changes
Models
employment_typefield to theExperiencemodelPerson Scraper
EMPLOYMENT_TYPE_MAPfor normalizing employment type values_get_experiences_from_details()- Extract from details/experience page_get_experiences_from_main_page()- Fallback extraction from main profile_parse_grouped_main_page_role()- Parse nested roles on main page_parse_grouped_details_experience()- Parse grouped entries from details page_parse_grouped_detail_role()- Parse individual role in grouped experience_is_experience_time_text()- Detect date/duration text_normalize_employment_type()- Normalize employment type strings_extract_employment_type_from_text()- Extract employment type from text_split_company_and_employment_type()- Split company name from employment typeTests