From 98a3f7225b8b1265b3255a7e104545ea94e05ab4 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 1 Aug 2019 18:47:59 +0200 Subject: Translations - basic makefile --- commcrawler/scrapy.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'commcrawler/scrapy.py') diff --git a/commcrawler/scrapy.py b/commcrawler/scrapy.py index ea58164..e821a31 100644 --- a/commcrawler/scrapy.py +++ b/commcrawler/scrapy.py @@ -7,6 +7,8 @@ from django.conf import settings class DefaultSpider: + target_id = None + def _parse_image(self, response, result): for __ in response.css('img'): if 'nb_images' not in result: @@ -19,9 +21,6 @@ class DefaultSpider: "target_id": self.target_id } self._parse_image(response, result) - - yield result - for link in LinkExtractor().extract_links(response): if link.url is not None: yield response.follow(link.url, self.parse) -- cgit v1.2.3