def process_item(self, item, spider): if item['title']: item['title'] = lower(remove_nonalpha(item['title'])) else: raise DropItem("Missing title in %s" % item) return item
def process_item(self, item, spider): if item['body_raw']: item['body_bag'] = lower(remove_nonalpha(" ".join(item['body_raw']))) else: raise DropItem("Missing the raw body in %s" % item) return item