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