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)
| 57 | return feedparser.close() |
| 58 | |
| 59 | def parsestr(self, text, headersonly=False): |
| 60 | """Create a message structure from a string. |
| 61 | |
| 62 | Returns the root of the message structure. Optional headersonly is a |
| 63 | flag specifying whether to stop parsing after reading the headers or |
| 64 | not. The default is False, meaning it parses the entire contents of |
| 65 | the file. |
| 66 | """ |
| 67 | return self.parse(StringIO(text), headersonly=headersonly) |
| 68 | |
| 69 | |
| 70 | class HeaderParser(Parser): |
no test coverage detected