'ç»å®äžäžªæç« çè·¯åŸhttp://blog.csdn.net/marksinoberg/article/details/69569353ïŒ
éèŠèœ¬åäžºåœ¢åŠïŒ http://blog.csdn.net/Marksinoberg/comment/submit?id=69569353
:param articleurl:
:param content:
:return:'

def comment(self, articleurl, content):

    try:
        (bloguser, blogid) = (articleurl.split('/')[3], articleurl.split('/')[(-1)])
        commenturl = 'http://blog.csdn.net/{}/comment/submit?id={}'.format(bloguser, blogid)
    except:
        print (commenturl, '    \xe4\xb8\x8d\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe5\x90\x88\xe6\xb3\x95\xe7\x9a\x84\xe8\xb7\xaf\xe5\xbe\x84\xef\xbc\x81')
    print commenturl
    postdata = {'commentid': self.username, 'replyid': bloguser, 'content': content}
    response = self.session.post(url=commenturl, headers=self.headers, data=postdata)
    if (response.status_code == 200):
        print response.json()
        if (response.json()['result'] == 1):
            print '\xe8\xaf\x84\xe8\xae\xba\xe6\x88\x90\xe5\x8a\x9f\xe5\x92\xaf\xef\xbc\x81'
        else:
            print '\xe6\x9c\x8d\xe5\x8a\xa1\xe5\x99\xa8\xe8\xae\xbf\xe9\x97\xae\xe6\x88\x90\xe5\x8a\x9f\xef\xbc\x8c\xe4\xbd\x86\xe8\xaf\x84\xe8\xae\xba\xe6\x93\x8d\xe4\xbd\x9c\xe5\xa4\xb1\xe8\xb4\xa5\xe4\xba\x86\xef\xbc\x81'
    else:
        print '\xe8\xaf\x84\xe8\xae\xba\xe5\x87\xba\xe7\x8e\xb0\xe4\xba\x86\xe7\x82\xb9\xe5\xbc\x82\xe5\xb8\xb8\xef\xbc\x81'
