added indeed suport

start extracting date from "vor X days" where time = today-X
This commit is contained in:
2024-07-23 14:55:37 +02:00
parent 8d59514ddf
commit 42d11c1c8d
5 changed files with 80 additions and 18 deletions

View File

@@ -23,6 +23,8 @@ def choose_scraper(entry,session):
runner(entry,session,scrap_jobagent,next_url_jobagent)
case 'https://www.jobagent.ch':
runner(entry,session,scrap_jobagent,next_url_jobagent)
case 'https://ch.indeed.com':
runner(entry,session,scrap_indeed_com,next_url_indeed_com)
def parse(**kwargs):
session=0
@@ -95,7 +97,6 @@ def runner(entry,session,scrap_func,next_url_func):
print(domain)
if domain == 'https://www.jobagent.ch' or domain == 'https://software-job.ch':
jobs = scrap_func(b_url,entry,session)
log("jobs passing to db:",jobs)
if jobs:
writedb(jobs)
else:
@@ -108,6 +109,15 @@ def runner(entry,session,scrap_func,next_url_func):
else:
print("nothing found on this page")
b_url = next_url_func(b_url,session,"https://www.jobs.ch")
elif domain == 'https://ch.indeed.com':
jobs = scrap_func(b_url,entry,session)
if jobs:
writedb(jobs)
else:
print("nothing found on this page")
b_url = next_url_func(b_url,session,domain)
if b_url != 0:
print("main:" + b_url)