Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.7 kB
3
Indexable
Never
let
    Source = Json.Document(Web.Contents("https://justjoin.it/api/offers/search?keywords[]=" & JobName)),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Kept First Rows" = Table.FirstN(#"Converted to Table",JobNumbers),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Kept First Rows", "Column1", {"title", "street", "city", "country_code", "address_text", "marker_icon", "workplace_type", "company_name", "company_url", "company_size", "experience_level", "latitude", "longitude", "published_at", "remote_interview", "open_to_hire_ukrainians", "id", "display_offer", "employment_types", "company_logo_url", "skills", "remote", "multilocation", "way_of_apply"}, {"title", "street", "city", "country_code", "address_text", "marker_icon", "workplace_type", "company_name", "company_url", "company_size", "experience_level", "latitude", "longitude", "published_at", "remote_interview", "open_to_hire_ukrainians", "id", "display_offer", "employment_types", "company_logo_url", "skills", "remote", "multilocation", "way_of_apply"}),
    #"Expanded multilocation" = Table.ExpandListColumn(#"Expanded Column1", "multilocation"),
    #"Expanded multilocation1" = Table.ExpandRecordColumn(#"Expanded multilocation", "multilocation", {"city", "street", "slug"}, {"multilocation.city", "multilocation.street", "multilocation.slug"}),
    #"Expanded skills" = Table.ExpandListColumn(#"Expanded multilocation1", "skills"),
    #"Expanded skills1" = Table.ExpandRecordColumn(#"Expanded skills", "skills", {"name", "level"}, {"skills.name", "skills.level"}),
    #"Expanded employment_types" = Table.ExpandListColumn(#"Expanded skills1", "employment_types"),
    #"Expanded employment_types1" = Table.ExpandRecordColumn(#"Expanded employment_types", "employment_types", {"type", "salary"}, {"employment_types.type", "employment_types.salary"}),
    #"Expanded employment_types.salary" = Table.ExpandRecordColumn(#"Expanded employment_types1", "employment_types.salary", {"from", "to", "currency"}, {"employment_types.salary.from", "employment_types.salary.to", "employment_types.salary.currency"}),
    #"Removed Duplicates" = Table.Distinct(#"Expanded employment_types.salary", {"id"}),
    #"Added Custom" = Table.AddColumn(#"Removed Duplicates", "LinkAPI", each "https://justjoin.it/api/offers/" & [id]),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "BodyHtml", each Json.Document(Web.Contents([LinkAPI]))),
    #"Expanded BodyHtml" = Table.ExpandRecordColumn(#"Added Custom1", "BodyHtml", {"body"}, {"BodyHtml.body"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded BodyHtml",{{"BodyHtml.body", "BodyHtml"}})
in
    #"Renamed Columns"