summaryrefslogtreecommitdiff
path: root/commcrawler/scrapy.py
diff options
context:
space:
mode:
Diffstat (limited to 'commcrawler/scrapy.py')
-rw-r--r--commcrawler/scrapy.py5
1 files changed, 2 insertions, 3 deletions
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)