def __init__(self, urls_file, N=10, *a, **kw):
    data = open(urls_file, 'r').readlines()[:N]
self.allowed_domains = [urlparse(i).hostname.strip() for i in data]
Crawling multiple sites with Python Scrapy with limited depth per site