python类TwythonStreamer()的实例源码

archivelinks.py 文件源码 项目:linkarchiver 作者: thisisparker 项目源码 文件源码 阅读 33 收藏 0 点赞 0 评论 0
def get_stream_instance():
    app_key, app_secret, oauth_token, oauth_token_secret = get_twitter_creds()
    return TwythonStreamer(app_key, app_secret, oauth_token, oauth_token_secret)
DiscordTwitterBot.py 文件源码 项目:discord-twitter-bot 作者: fritzr 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def on_success(self, data):
        """Called by TwythonStreamer when a message is received on the
underlying stream. Dispatches the message to all registered callbacks (in the
order they were registered) if the message is not a duplicate or show_dupes is
enabled."""
        # Make sure this is a tweet we are interested in
        if not self._filter_tweet(data):
            return

        # Remember this message - if we reach our store limit, pop the oldest
        self._remember(data)

        # Notify callbacks
        for callback in self._callbacks:
            callback(data)


问题


面经


文章

微信
公众号

扫码关注公众号