這兩天被 comment spam,於是 google 了一下找到一個網頁,不能直接跑,但小改一點就可以砍 spam 了。在 COREBlog root 裡建一個 Script (Python) 物件:

for i in range(1, 465):
    try:
        ent = container.get_entry(i)
        for com in ent.comment_list():
            if com.author == "Charge Back":
                ent.deleteComment(int(com.id))
                print "%s: %s deleted" % ( com.id, com.author )
    except:
        pass

print "Done."
return printed

現在想起來,一直以來都沒有把 COREBlog 的架構弄清楚過呢;連砍 spam 都要用抄的 ;p

Posted by yungyuc at 16:53, 1 comments, 0 trackback.
Navigate
Add a trackback
Comments
Re: Comment spam
之前常常得照顧 COREBlog comment/trackback spam 的問題。

也是參考到類似的,然後做些衍申: http://blog.tcchou.org/Members/tcchou/zope/erase_coreblog_spam


-----
tcc at 2006-01-28 01:12.
Add a comment

Your name. (required)

Your personal website. (optional)

Your email address. Will not show in page. (suggested, but optional)

Text format is "Plain Text".

Enter "WndlO"
© hover year to navigate month: powered by django