這兩天被 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
Navigate
- Previous: 自由軟體、開放原始碼,國內? @2006/01/21
- Next: Gaspacho @2006/01/27
Add a trackback
Please send trackback to: http://blog.seety.org/everydaywork/2006/1/27/466/trackback/.
Comments
Add a comment
也是參考到類似的,然後做些衍申: http://blog.tcchou.org/Members/tcchou/zope/erase_coreblog_spam
-----