用于下载邮件列表档案的开源项目,最好是用Python(Open source project for downloading mailing list archives preferably in P

编程入门 行业动态 更新时间:2024-10-08 10:49:47
用于下载邮件列表档案的开源项目,最好是用Python(Open source project for downloading mailing list archives preferably in Python)

我有兴趣知道是否有任何开源项目(最好是用Python)可以用来下载(抓取?)Lucene / Hadoop等开源项目的邮件列表档案(例如http:// mail-archives) .apache.org / mod_mbox / lucene-java-user / )。 我特地寻找为(Apache)邮件列表存档(不是像Scrappy这样的通用爬虫)定制的爬虫/下载器。 任何指针都非常感谢。 谢谢。

I am interested in knowing if there are any open source projects (preferably in Python) which can be used to download (crawl?) the mailing list archives of open source projects such as Lucene/Hadoop (such as http://mail-archives.apache.org/mod_mbox/lucene-java-user/). I am specially looking for a crawler/downloader customized for (Apache) mailing list archives (not a generic crawler such as Scrappy). Any pointers are highly appreciated. Thank you.

最满意答案

通常有下载mbox文件的工具。 在您提供的链接中,您可以例如附加mbox名称并直接获取邮件存档。 例如,2012年10月的mbox:

http://mail-archives.apache.org/mod_mbox/lucene-java-user/201210.mbox

因此以编程方式获取档案非常简单。 一旦你拥有它们:

import mailbox mails = mailbox.mbox(filename.mbox) for message in mails: print message['subject']

There's usually facilities for downloading mbox files. In the link you provided, you can for example append the mbox name and get the mail archive directly. Example, the mbox for October 2012:

http://mail-archives.apache.org/mod_mbox/lucene-java-user/201210.mbox

So getting the archives programmatically is pretty straightforward. Once you have them:

import mailbox mails = mailbox.mbox(filename.mbox) for message in mails: print message['subject']

更多推荐

本文发布于:2023-08-07 13:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464145.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:开源   邮件列表   档案   项目   Open

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!