diff options
Diffstat (limited to 'commcrawler/management')
-rw-r--r-- | commcrawler/management/commands/launch_crawl.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/commcrawler/management/commands/launch_crawl.py b/commcrawler/management/commands/launch_crawl.py index 92c3081..1248eeb 100644 --- a/commcrawler/management/commands/launch_crawl.py +++ b/commcrawler/management/commands/launch_crawl.py @@ -3,7 +3,7 @@ import sys from django.core.management.base import BaseCommand -from commcrawler.models import Crawl +from commcrawler.models import Crawl, ExludedDomains from commcrawler.scrapy import launch_crawl @@ -57,5 +57,7 @@ class Command(BaseCommand): except ValueError: c_id = None current_crawl = crawls[c_id] - launch_crawl(current_crawl) + excluded = [domain.split("://")[1] for domain in + ExludedDomains.objects.all()] + launch_crawl(current_crawl, excluded_domains=excluded) |