diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-08-12 15:38:40 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-08-12 15:38:40 +0200 |
commit | 6673b347d16f53012e8929da67f57d317a71781d (patch) | |
tree | 1345ef2f99a02718cd7f7a77b72cde0731e39da9 /commcrawler | |
parent | 7ace76fc0e49ac31b469b2c61b4830282630a85a (diff) | |
download | Comm-on-net-6673b347d16f53012e8929da67f57d317a71781d.tar.bz2 Comm-on-net-6673b347d16f53012e8929da67f57d317a71781d.zip |
Fix idx problem (bis)
Diffstat (limited to 'commcrawler')
-rw-r--r-- | commcrawler/scrapy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commcrawler/scrapy.py b/commcrawler/scrapy.py index 3b2fb51..1c26834 100644 --- a/commcrawler/scrapy.py +++ b/commcrawler/scrapy.py @@ -336,9 +336,9 @@ def launch_crawl(crawl_item, excluded_domains=None): idx = 0 current_idx = page * 50 while current_idx < total and idx < 50: + target = models.Target.objects.filter(pk=targets[current_idx]['id']) idx += 1 current_idx = idx + page * 50 - target = models.Target.objects.filter(pk=targets[current_idx]['id']) if not target.count(): # target has disappear continue target = target.all()[0] |