logic error when pubdate not found

This commit is contained in:
2024-06-17 10:27:13 +02:00
parent c35c23f073
commit ac8c7251e8
3 changed files with 13 additions and 9 deletions

View File

@@ -7,6 +7,11 @@ from login import *
from time import sleep
from db import *
DEBUG = False
def log(*s):
if DEBUG:
print(s)
def choose_scraper(entry,session):
if not session:
session = requests.Session()
@@ -89,7 +94,7 @@ 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)
print("jobs passing to db:",jobs)
log("jobs passing to db:",jobs)
if jobs:
writedb(jobs)
else: