summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-12 15:36:55 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-08-12 15:36:55 +0200
commit7ace76fc0e49ac31b469b2c61b4830282630a85a (patch)
tree59427b51fb05377d2826155ac8b536d83b63ecde
parent5835ead75454e387cd7eaacac2ce7658719848dc (diff)
downloadComm-on-net-7ace76fc0e49ac31b469b2c61b4830282630a85a.tar.bz2
Comm-on-net-7ace76fc0e49ac31b469b2c61b4830282630a85a.zip
Slicing: fix idx problem
-rw-r--r--commcrawler/scrapy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/commcrawler/scrapy.py b/commcrawler/scrapy.py
index d01c5c6..3b2fb51 100644
--- a/commcrawler/scrapy.py
+++ b/commcrawler/scrapy.py
@@ -338,7 +338,7 @@ def launch_crawl(crawl_item, excluded_domains=None):
while current_idx < total and idx < 50:
idx += 1
current_idx = idx + page * 50
- target = models.Target.objects.filter(pk=targets['id'])
+ target = models.Target.objects.filter(pk=targets[current_idx]['id'])
if not target.count(): # target has disappear
continue
target = target.all()[0]