logic error when pubdate not found
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user