Drkcore

28 07 2011 javascript Tweet

Node.jsでtwitterのストリームをだらだらと流してみる。

twitter-nodeを使う。

var TwitterNode = require('twitter-node').TwitterNode
, sys = require('sys');

var twit = new TwitterNode({
  user: '######', 
  password: '#########',
  track: ['perl','python','haskell','javascript']
});

twit.addListener('error', function(error) {
  console.log(error.message);
});

twit
  .addListener('tweet', function(tweet) {
    sys.puts("@" + tweet.user.screen_name + ": " + tweet.text);
  })
  .stream();

実行結果

$ node tw.js 
@halfstepper: @seocosenza Ah, mi spiace, non ne so niente, io mi occupo di php-html-javascript, per il resto mi barcameno, ma non sono ferrato :-(
@rapella: RT @deliprao: Why MIT switch from Scheme to Python? (via @gappy3000) http://ow.ly/5N6hO
@piotrlukanko: RT @6Wunderkinder: We really need talented #JavaScript and #PHP (#CodeIgniter) developers @6Wunderkinder in #Berlin jobs@6wunderkinder.c ...
@js_gallery: Javascript motion gallery Forum | Yo! Venice! Forum. This forum requires Javascript to be enabled for posting ... http://tinyurl.com/4azlt77
@stackfeed: line aligning, HTML, CSS JAVASCRIPT: I am making an application for an android phone using eclipse, I want to be... http://bit.ly/oe79tO
@perlism: RT !natsutan: Pythonの文字列処理苦手。perlの s// が気楽で良い
@perlism: RT !reanisz: 「Perl好き」とは常日頃言っているが「Perlが得意」な訳ではない・・・(´・ω・`)
@glidepro: RT @creativeapps: New #Javascript feature on CAN: DrippingPaint.Js by @twholman | http://ca-n.in/nWFbWr
@_yueyue350179: RT @perlism: RT !natsutan: Pythonの文字列処理苦手。perlの s// が気楽で良い
@Nikole_2: "I know you like with the lights on, even if they off you can still feel the python" #SWAG
@jcvfeed2: Rugby - Top 14 - Manas : "Une ébauche du projet de jeu" (Rugbyrama.fr) javascript:void(0);

なかなか楽しい。

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021