Scrapy拓展——完成时发通知邮件


# 接收方
STATSMAILER_RCPTS = ['xxx@qq.com']

# 配置邮件服务器
MAIL_FROM = 'xxx@qq.com'
MAIL_HOST = 'smtp.qq.com'
MAIL_PORT = 465
MAIL_USER = 'xxx@qq.com'
MAIL_PASS = '授权码'
MAIL_SSL = True

# 开启此拓展
EXTENSIONS = {
    'scrapy.extensions.statsmailer.StatsMailer': 500,
}
posted @ 2020-01-17 11:11  961897  阅读(281)  评论(0编辑  收藏  举报