Skip to content

Latest commit

 

History

History
169 lines (142 loc) · 3.68 KB

File metadata and controls

169 lines (142 loc) · 3.68 KB

원티드 구인공고 크롤링

Languages: TypeScript Tags: Developer job

데이터 모델 구조

classDiagram

WantedResponse <-- Job: data

class WantedResponse {
    <<interface>>
    links: Links
    data: List~Job~
    is_callable_external_job: boolean
    is_score: boolean
}

class Job {
    <<interface>>
    status: Status
    company: Company
    title_img: Img
    logo_img: Img
    compare_country: boolean
    like_count: number
    id: number
    address: AddressSimple
    category_tags: List~CategoryTag~
    reward: Reward
    is_like: boolean
    is_bookmark: boolean
    position: string
}

Job <-- Company: company
Job <-- Img: title_img
Job <-- Img: logo_img
Job <-- CategoryTag: category_tags
Job <-- Reward: reward

class CategoryTag {
    <<interface>>
    parent_id: number
    id: number
}

Company <-- ApplicationResponseStats: application_response_stats

class Company {
    <<interface>>
    id: number
    industry_name: IndustryName
    application_response_stats: ApplicationResponseStats
    name: string
}

class Reward {
    <<interface>>
    formatted_total: FormattedTotal
    formatted_recommender: FormattedRecommend
    formatted_recommendee: FormattedRecommend
}

class ApplicationResponseStats {
    <<interface>>
    avg_rate: number
    level: Level
    delayed_count: number
    remained_count: number
    type: Type
}

class Img {
    <<interface>>
    origin: string
    thumb: string
}

DescribeJob <-- Detail: detail
DescribeJob <-- CompanyImage: company_images
DescribeJob <-- Tag: skill_tags
DescribeJob <-- Company: company
DescribeJob <-- Img: logo_img
DescribeJob <-- CompanyTag: company_tags
DescribeJob <-- Img: title_img
DescribeJob <-- CategoryTag: category_tags
DescribeJob <-- MatchingScore: matching_score
DescribeJob <-- Reward: reward

class DescribeJob {
    <<interface>>
    address: Address
    like_count: number
    id: number
    detail: Detail
    company_images: List~CompanyImage~
    skill_tags: List~Tag~
    status: string
    company: Company
    logo_img: Img
    company_tags: List~CompanyTag~
    title_img: Img
    position: string
    category_tags: List~CategoryTag~
    is_crossboarder: boolean
    is_like: boolean
    score: number
    is_bookmark: boolean
    is_company_follow: boolean
    compare_country: boolean
    matching_score: MatchingScore
    reward: Reward
}

class CompanyImage {
    <<interface>>
    url: string
    id: number
}

class Tag {
    <<interface>>
    title: string
    id: number
    kind_title: string
}

class MatchingScore {
    <<interface>>
    resume_id: number
    model_version: number
    score: number
    wd_id: number
    id: number
}

class Detail {
    <<interface>>
    requirements: string
    main_tasks: string
    intro: string
    benefits: string
    preferred_points: string
}

class CompanyTag {
    <<interface>>
    title: string
    id: number
    kind_title: KindTitle
}
Loading

깃허브 코드 (gist)

?: 삼항식 타입을 사용해 AxiosResponsedata 값을 미리 단언하는 코드

Serverless-Framework-Crawlers/response.types.ts

infer 키워드를 사용해 유틸리티 타입을 구현한 ArrayElement<T> 커스텀 타입

Serverless-Framework-Crawlers/notion.types.ts

결과물 테이블 (csv or db)

원티드