aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--comments.xml6
-rw-r--r--xml2static_rst.py4
2 files changed, 6 insertions, 4 deletions
diff --git a/comments.xml b/comments.xml
index ffe98a9..a6553ca 100644
--- a/comments.xml
+++ b/comments.xml
@@ -7498,7 +7498,7 @@ xsi:schemaLocation="http://disqus.com/api/schemas/1.0/disqus.xsd http://disqus.c
</message>
<createdAt>2018-03-12T16:06:46Z</createdAt>
<isDeleted>false</isDeleted>
- <isSpam>true</isSpam>
+ <isSpam>false</isSpam>
<author>
<name>Rick Holbert</name>
<isAnonymous>false</isAnonymous>
@@ -7700,7 +7700,7 @@ xsi:schemaLocation="http://disqus.com/api/schemas/1.0/disqus.xsd http://disqus.c
</message>
<createdAt>2021-01-21T01:00:15Z</createdAt>
<isDeleted>false</isDeleted>
- <isSpam>false</isSpam>
+ <isSpam>true</isSpam>
<author>
<name>contact office</name>
<isAnonymous>false</isAnonymous>
@@ -7730,7 +7730,7 @@ xsi:schemaLocation="http://disqus.com/api/schemas/1.0/disqus.xsd http://disqus.c
</message>
<createdAt>2021-03-21T09:33:52Z</createdAt>
<isDeleted>false</isDeleted>
- <isSpam>false</isSpam>
+ <isSpam>true</isSpam>
<author>
<name>Unknown</name>
<isAnonymous>false</isAnonymous>
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']