'æç»å®çæç« è·¯åŸ http://blog.csdn.net/marksinoberg/article/details/69569353
åèœ¬åäžäžäžºïŒ http://blog.csdn.net/marksinoberg/article/digg?ArticleId=69569353
:param articleurl åŸæäœçæç« è·¯åŸ
:param digg: ç»æç« ç¹èµè¿æ¯èž©äžäž
:return:'

def digg(self, articleurl, digg=True):

    try:
        (bloguser, blogid) = (articleurl.split('/')[3], articleurl.split('/')[(-1)])
        if (digg == True):
            diggurl = 'http://blog.csdn.net/{}/article/digg?ArticleId={}'.format(bloguser, blogid)
        else:
            diggurl = 'http://blog.csdn.net/{}/article/bury?ArticleId={}'.format(bloguser, blogid)
    except:
        print '\xe6\x82\xa8\xe8\xbe\x93\xe5\x85\xa5\xe7\x9a\x84\xe6\x96\x87\xe7\xab\xa0\xe8\xb7\xaf\xe5\xbe\x84\xe9\x9d\x9e\xe6\xb3\x95\xef\xbc\x81'
    print ('\xe5\xbe\x85\xe6\x93\x8d\xe4\xbd\x9c\xe6\x96\x87\xe7\xab\xa0\xe7\x9a\x84\xe8\xb7\xaf\xe5\xbe\x84\xef\xbc\x9a    ', diggurl)
    self.headers['X-Requested-With'] = 'XMLHttpRequest'
    self.headers['Host'] = 'blog.csdn.net'
    self.headers['Referer'] = articleurl
    response = self.session.get(url=diggurl, headers=self.headers)
    if (response.status_code == 200):
        articlejson = response.json()
        (digg, bury) = (articlejson['digg'], articlejson['bury'])
        print '\xe6\x96\x87\xe7\xab\xa0\xef\xbc\x9a{}\n\xef\xbc\x9a\xe8\xa2\xab\xe7\x82\xb9\xe8\xb5\x9e\xe6\x95\xb0\xef\xbc\x9a{},    \xe8\xa2\xab\xe8\xb8\xa9\xe6\x95\xb0\xef\xbc\x9a{}'.format(articleurl, digg, bury)
    else:
        print '\xe7\xbd\x91\xe7\xbb\x9c\xe6\x88\x96\xe6\x9c\x8d\xe5\x8a\xa1\xe5\x99\xa8\xe5\x87\xba\xe7\x8e\xb0\xe4\xba\x86\xe9\x97\xae\xe9\xa2\x98\xef\xbc\x8c\xe7\x82\xb9\xe8\xb5\x9e\xe6\x93\x8d\xe4\xbd\x9c\xe5\x87\xba\xe7\x8e\xb0\xe4\xba\x86\xe7\x82\xb9\xe6\x95\x85\xe9\x9a\x9c\xef\xbc\x81'
    self.headers['Referer'] = ''
