for i in range(1, 1754):
try:
ent = container.blog.get_entry(i)
for com in ent.comment_list():
if com.author == "bogi" or com.author == "gogi":
ent.deleteComment(int(com.id))
except:
pass
return "I did it, Babe!"
blog ist das »folderish object« (das Verzeichnis), das mein Blog enthält, die try — except-Weiche war notwendig, da ich einige (Doppel-) Postings gelöscht hatte und es daher keine id mit diesem Eintrag gab. Der Rest ist — glaube ich — selbsterklärend. Dank Atsushi Shibata haben Comment-Spammer im COREblogs keine Chance.
Posted by kantel at 12:52
| Comments (0)
| Trackbacks (1)
| [Python]
| [Interna]
| [Weblog und CMS]
| [Dosenfleisch]
