Skip to main content

No description.

Project description

maida

自己写的一些库,目前只有一个发送邮件的功能。


安装

可以直接 pip 安装

pip install maida

mail

EmailSender

基于 smtplib 的发送邮件脚本

  1. 可以发送文本
  2. 可以发送图片
  3. 可以发送附件(图片、文件等),附件文件名可以包含中文
  4. 可以群发邮件

demo

email = EmailSender(email_host='smtp.qq.com', email_pass='xxx')
content = '这是lzc发送过来的邮件。请注意查收!'
email.init(from_addr='xxx@qq.com', to_addrs=['xxx@qq.com'], subject='测-试')
email.attach_text(text=content)
email.attach_file(r'C:\xxx\xx.jpg')
email.attach_file(r'C:\xxx\xx.txt')
email.send()
email.close()

scrapy

整合了 scrapy_mail 中的拓展,详情请到原始页面查看
scrapy 使用此拓展时可以直接引用,不用手动复制至 scrapy 同级目录

EXTENSIONS = {
    'lzc.extensions.closespider.CloseSpider': 200,
}

变更为

EXTENSIONS = {
    'maida.scrapy.extensions.closespider.CloseSpider': 200,
}

其他地方保持不变

版本历程

详见 history.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for maida, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size maida-0.1.1-py3-none-any.whl (7.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size maida-0.1.1.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page