From f84e8fb75b8096dff5a39936ac26c933fdba3059 Mon Sep 17 00:00:00 2001 From: neodarz Date: Wed, 6 Feb 2019 00:03:04 +0100 Subject: Fix logging info --- crawler/neodarznet/pipelines.py | 3 +-- crawler/nevrax/pipelines.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'crawler') diff --git a/crawler/neodarznet/pipelines.py b/crawler/neodarznet/pipelines.py index 1f3a9fc..36a7f1f 100644 --- a/crawler/neodarznet/pipelines.py +++ b/crawler/neodarznet/pipelines.py @@ -12,9 +12,8 @@ class NeodarznetPipeline(object): if page.content_length != item['content_length']: q = Neodarznet.update(**item).where(Neodarznet.url == item['url']) q.execute() - logging.info("Update item {}".format(page)) + logging.info("Update item {}".format(page)) except Neodarznet.DoesNotExist: page = Neodarznet.create(**item) logging.info("Create item {}".format(page)) - logging.info('Item {} stored in db'.format(page)) return item diff --git a/crawler/nevrax/pipelines.py b/crawler/nevrax/pipelines.py index dbbb782..d9aa4fd 100644 --- a/crawler/nevrax/pipelines.py +++ b/crawler/nevrax/pipelines.py @@ -12,9 +12,8 @@ class NevraxPipeline(object): if page.content_length != item['content_length']: q = Nevrax.update(**item).where(Nevrax.url == item['url']) q.execute() - logging.info("Update item {}".format(page)) + logging.info("Update item {}".format(page)) except Nevrax.DoesNotExist: page = Nevrax.create(**item) logging.info("Create item {}".format(page)) - logging.info('Item {} stored in db'.format(page)) return item -- cgit v1.2.1