summaryrefslogtreecommitdiff
path: root/commcrawler/scrapy.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-01 18:47:59 +0200
committerÉtienne Loks <etienne@peacefrogs.net>2019-08-01 18:47:59 +0200
commit98a3f7225b8b1265b3255a7e104545ea94e05ab4 (patch)
tree2b989210904c577ea4c241c1f850674adea1f8d7 /commcrawler/scrapy.py
parent108b5514fe795e3bbf4c76245047f5ea054c3d20 (diff)
downloadComm-on-net-98a3f7225b8b1265b3255a7e104545ea94e05ab4.tar.bz2
Comm-on-net-98a3f7225b8b1265b3255a7e104545ea94e05ab4.zip
Translations - basic makefile
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)