helpers.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:publishfeed 作者: marcanuy 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号