Create a message structure from a string. Returns the root of the message structure. Optional headersonly is a flag specifying whether to stop parsing after reading the headers or not. The default is False, meaning it parses the entire contents of the file.
(self, text, headersonly=False)
| 54 | return feedparser.close() |
| 55 | |
| 56 | def parsestr(self, text, headersonly=False): |
| 57 | """Create a message structure from a string. |
| 58 | |
| 59 | Returns the root of the message structure. Optional headersonly is a |
| 60 | flag specifying whether to stop parsing after reading the headers or |
| 61 | not. The default is False, meaning it parses the entire contents of |
| 62 | the file. |
| 63 | """ |
| 64 | return self.parse(StringIO(text), headersonly=headersonly) |
| 65 | |
| 66 | |
| 67 | class HeaderParser(Parser): |