def tweet_rsscontent(self, rsscontent):
credentials = self.data['twitter']
twitter = Twitter(**credentials)
body_length = self._calculate_tweet_length()
tweet_body = rsscontent.title[:body_length]
tweet_url = rsscontent.url
tweet_hashtag = self.data['hashtags']
tweet_text = "{} {} {}".format(tweet_body, tweet_url, tweet_hashtag)
twitter.update_status(tweet_text)
rsscontent.published=True
self.session.flush()
评论列表
文章目录