def filterTweet(tweet):
if(tweet.find("转发")!=-1):
return ""
if tweet[0:1]=='>':
tweet=tweet[1:]
if(len(unicode(tweet,'utf-8'))>140):
return tweet.decode('utf-8')[0:114].encode('utf-8') + '…' + tweet.decode('utf-8')[len(unicode(tweet,'utf-8'))-25:].encode('utf-8')
return tweet
没有评论:
发表评论