logic error when pubdate not found

This commit is contained in:
2024-06-17 10:22:28 +02:00
parent 61ce809d9f
commit e7f634d19a
4 changed files with 22 additions and 11 deletions

View File

@@ -89,11 +89,18 @@ 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)
writedb(jobs)
print("jobs passing to db:",jobs)
if jobs:
writedb(jobs)
else:
print("nothing found on this page")
b_url = next_url_func(b_url,session,0)
elif domain == 'https://www.jobs.ch':
jobs = scrap_func(b_url,entry,session)
writedb(jobs)
if jobs:
writedb(jobs)
else:
print("nothing found on this page")
b_url = next_url_func(b_url,session,"https://www.jobs.ch")
if b_url != 0: