From 8baa108aab5fbf0845e29f76b0e59c09824e0675 Mon Sep 17 00:00:00 2001 From: rugantio Date: Tue, 23 Apr 2019 08:22:48 +0200 Subject: [PATCH] removing date pipeline --- fbcrawl/pipelines.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fbcrawl/pipelines.py b/fbcrawl/pipelines.py index 0d7e659..48f911f 100644 --- a/fbcrawl/pipelines.py +++ b/fbcrawl/pipelines.py @@ -9,10 +9,11 @@ from scrapy.exceptions import DropItem from datetime import datetime class FbcrawlPipeline(object): - def process_item(self, item, spider): - if item['date'] < datetime(2017,1,1).date(): - raise DropItem("Dropping element because it's older than 01/01/2017") - elif item['date'] > datetime(2018,3,4).date(): - raise DropItem("Dropping element because it's newer than 04/03/2018") - else: - return item + pass +# def process_item(self, item, spider): +# if item['date'] < datetime(2017,1,1).date(): +# raise DropItem("Dropping element because it's older than 01/01/2017") +# elif item['date'] > datetime(2018,3,4).date(): +# raise DropItem("Dropping element because it's newer than 04/03/2018") +# else: +# return item