Re: How do I Extract Attachment from Newsgroup Message
- From: "Dave Borne" <dborne@xxxxxxxxx>
- Date: Thu, 31 May 2007 10:03:05 -0500
I looked for a solution....
with mimetools (the way I'd approach it for email) but found nothing.
<D8PANKEG1@xxxxxxxxxxx>', 'Content-Type: Multipart/Mixed;', '....
boundary="------------Boundary-00=_A5NJCP3FX6Y5BI3BH890"', 'Date: Thu,
Playing with
data = n.article('116431')[3]
and email.message_from_string, there seems to be a problem with the
content type being split up. I was able to get a multipart message by
using
msg = email.message_from_string('\n'.join(data).replace(';\n', ';'))
(and adding an ending boundary to your sample data).
This is a bit hackish and could cause problems if there are
semicolons inside the message body (no warranties expressed or
implied, etc.)
Hope this helps,
-Dave
.
- References:
- How do I Extract Attachment from Newsgroup Message
- From: snewman18@xxxxxxxxx
- How do I Extract Attachment from Newsgroup Message
- Prev by Date: RE: c[:]()
- Next by Date: Re: Python memory handling
- Previous by thread: Re: How do I Extract Attachment from Newsgroup Message
- Next by thread: Upgrading a largish group of packages w/ distutils
- Index(es):