diff options
Diffstat (limited to 'commcrawler')
-rw-r--r-- | commcrawler/scrapy.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/commcrawler/scrapy.py b/commcrawler/scrapy.py index 767827a..7702ea6 100644 --- a/commcrawler/scrapy.py +++ b/commcrawler/scrapy.py @@ -296,7 +296,8 @@ def launch_match(crawl_item): "pk", "target_id", "target__url").all(): if subresult["pk"] == result["pk"]: continue - if get_domain(subresult["target__url"]) in domains: + url = subresult["target__url"] + if url and get_domain(url) in domains: rel, created = models.CrawlRelation.objects.get_or_create( crawl_id=crawl_item.pk, source_id=result["target_id"], destination_id=subresult["target_id"]) |