diff options
Diffstat (limited to 'xml2static_rst.py')
-rw-r--r-- | xml2static_rst.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xml2static_rst.py b/xml2static_rst.py index f5c0d68..5824efc 100644 --- a/xml2static_rst.py +++ b/xml2static_rst.py @@ -23,7 +23,9 @@ for thread in root.findall("dflt:thread", ns): out = {} for com_post in root.findall("dflt:post", ns): - if com_post.find('dflt:isSpam', ns).text == 'false': + is_spam = com_post.find('dflt:isSpam', ns).text == 'true' + is_del = com_post.find('dflt:isDeleted', ns).text == 'true' + if not (is_spam or is_del): thread = com_post.find('dflt:thread', ns) thread_id = thread.attrib[f"{{{ns['xsi']}}}id"] blurb = threads[thread_id]['blurb'] |