jobs.ch changed, so changed scrap implementation

This commit is contained in:
2024-08-12 12:56:05 +02:00
parent 45899d44e3
commit 5b78e29242
4 changed files with 29 additions and 15 deletions

View File

@@ -57,17 +57,18 @@ def scrap_jobs(url,entry,session):
results = soup.find_all("div",attrs={'data-feat':'searched_jobs'})
location_class = "P-sc-hyu5hk-0 Text__p2-sc-1lu7urs-10 Span-sc-1ybanni-0 Text__span-sc-1lu7urs-12 Text-sc-1lu7urs-13 jZCxUn"
location = item("p",location_class,0,"location")
ar_location = finder(results,location,LOCATION_CLEANUP=1)
company_class = "P-sc-hyu5hk-0 Text__p2-sc-1lu7urs-10 Span-sc-1ybanni-0 Text__span-sc-1lu7urs-12 Text-sc-1lu7urs-13 jZCxUn"
location_class = "d_grid items_start gap_s12 grid-cols_[auto_1fr] px_s8"
location = item("div",location_class,0,"location")
ar_location = finder(results,location,GETCHILDREN='p',LOCATION_CLEANUP=1)
company_class = "mb_s12 lastOfType:mb_s0 textStyle_p2"
company = item("p",company_class,0,"company")
ar_company = finder(results,company,DEFAULT=1,GETCHILDREN='strong')
title = item("span","jlFpCz",0,"TITLE")
title = item("span","text_link.brand.base",0,"TITLE")
ar_title = finder(results,title,DEFAULT=1)
date = item("span","Span-sc-1ybanni-0 Text__span-sc-1lu7urs-12 Text-sc-1lu7urs-13 krGudM hUhFmL",0,"date")
date = item("span","pos_absolute",0,"date")
ar_date = finder(results,date,CLEANDATE=1)
link = item("a",{'data-cy' :'job-link'},0,"link")