1

Hello I have a Python program and it is capable of fetching emails from gmail. Everything works fine, except for the fact that there are a bunch of

......"ransition99/xhtml">=0D=0A<head>=0D=

=0A<ml; =0D=0A=0D=0Acharset=3DUTF-8" />=0D=0A<title>Untitled Document</title>=0D=0A</head>=0D=0A=0D=0A=0D=0A<body>=0D=0A=0D=0A<p>=0D=0A border=3D=

"0" =0D=0A=0D=0Asrc=3"......

that kind of stuff. Would stripping the email of HTML clean this up? I'm not even sure how to refer to this content, is there a particular language that emails are written in?

ps.. I had to delete some, because i cant post images.

xopenex
  • 263
  • 4
  • 9
  • 3
    If you are completely unfamiliar with email, you have some learning curve ahead of you. You should probably learn more about MIME. – tripleee Feb 27 '12 at 05:23

1 Answers1

2

It's encoded in quoted-printable.

>>> quopri.decodestring('''=0D=0A border=3D=
... "0"''')
'\r\n border="0"'
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358