I would like my Spider Crawl the start_urls
website entirely before follow more deeply the websites.
The crawler aim to find expired domains.
For exemple I create a page with 500 urls (450 expired & 50 actif websites), the crawler must insert in database every url before follow.
Actually the crawler follow the first website alive and stop crawling the start_urls
website.
This is my configuration :
self.custom_settings = {
'RETRY_ENABLED': False,
'DEPTH_LIMIT' : 0,
'DEPTH_PRIORITY' : 1,
'CONCURRENT_REQUESTS_PER_DOMAIN' : 64,
'CONCURRENT_REQUESTS' : 128,
'REACTOR_THREADPOOL_MAXSIZE' : 30,
}
Setting :
SCHEDULER_DISK_QUEUE = 'scrapy.squeues.PickleFifoDiskQueue'
SCHEDULER_MEMORY_QUEUE = 'scrapy.squeues.FifoMemoryQueue'
LOG_LEVEL = 'INFO'
DUPEFILTER_CLASS = 'dirbot.custom_filters.BLOOMDupeFilter'
Crawler :
rules = (
Rule(LxmlLinkExtractor(allow=('.com', '.fr', '.net', '.org', '.info', '.casino', '.co'),
deny=('facebook', 'amazon', 'wordpress', 'blogspot', 'free')),
callback='parse_obj',
process_request='add_errback',
follow=True),
)
def add_errback(self, request):
return request.replace(errback=self.errback_httpbin)
def errback_httpbin(self, failure):
if failure.check(DNSLookupError):
request = failure.request
ext = tldextract.extract(request.url)
domain = ext.registered_domain
if domain != '' :
self.checkDomain(domain)