From b14bb32f9b92393db241733f94d06a286525a3c1 Mon Sep 17 00:00:00 2001 From: Pedro Lopez-Adeva Date: Mon, 16 Nov 2015 10:39:42 +0100 Subject: [PATCH] Removed obligatory link score. Default score of 0 assumed --- aduana/frontera.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aduana/frontera.py b/aduana/frontera.py index c3db188..476ac58 100644 --- a/aduana/frontera.py +++ b/aduana/frontera.py @@ -61,7 +61,7 @@ def request_error(self, page, error): def page_crawled(self, response, links): cp = aduana.CrawledPage( response.url, - [(link.url, link.meta['scrapy_meta']['score']) for link in links]) + [(link.url, link.meta['scrapy_meta'].get('score', 0.0)) for link in links]) try: cp.score = response.meta['scrapy_meta']['score']