Reputation: 4085
i have multiple spiders in my project i run them at the same time. i want when each crawler finish either on ERROR or COMPLETION i receive an Email with STATS or ERROR
i go though Doc
http://doc.scrapy.org/en/latest/topics/extensions.html
i added these settings in project settings.py
EXTENSIONS = {
'scrapy.contrib.statsmailer.StatsMailer': 500,
}
STATSMAILER_RCPTS=['[email protected]']
but i am not able to receive any email , i am sure i am missing something any help will be appriciated , i think i need to setup SMTP server then it will work but i don't know how to configure that or anything else what i required to do for sending stats email
Upvotes: 0
Views: 1151
Reputation: 12998
Take a look at the source. Note the line
crawler.connect(o.stats_spider_closed, signal=signals.stats_spider_closed)
The source doc cleary stats
StatsMailer extension sends an email when a spider finishes scraping
The SatsMailer is only connected to a single signal. Why not create your own extension (you could copy-paste the existing code) and also connect it to one of Scarpy's signals
Upvotes: 1