发现了pamie这个有点意思的东西,就拿自己的来试验了下
# -*- coding: utf-8 -*-
'''
Created on 2009-7-19
@author: chenpu
'''
import re
from cPAMIE import PAMIE
url = 'http://127.0.0.1/wordpress/?p=10'
pattern = 'zck_list1(.*?)<DIV class=clearing'
ie = PAMIE()
ie.navigate(url)
ie.textBoxSet('author','fdsaaaaaaaaaaaaaaaa')
ie.textBoxSet('email','1@g.com')
ie.textBoxSet('url','fdsaaaaaaaaaaaaaaaa')
ie.textAreaSet('comment','fdsaaaaaaaaaaaaaaaa')
ie.buttonClick('提交评论')
cc=ie.outerHTML()
#print cc
改一下url地址就可以乱发啦,就是老是要看着ie运行有点点难受!..
# -*- coding: utf-8 -*-
'''
Created on 2009-7-19
@author: chenpu
'''
import re
from cPAMIE import PAMIE
url = 'http://127.0.0.1/wordpress/?p=10'
pattern = 'zck_list1(.*?)<DIV class=clearing'
ie = PAMIE()
ie.navigate(url)
ie.textBoxSet('author','fdsaaaaaaaaaaaaaaaa')
ie.textBoxSet('email','1@g.com')
ie.textBoxSet('url','fdsaaaaaaaaaaaaaaaa')
ie.textAreaSet('comment','fdsaaaaaaaaaaaaaaaa')
ie.buttonClick('提交评论')
cc=ie.outerHTML()
#print cc
改一下url地址就可以乱发啦,就是老是要看着ie运行有点点难受!..