update ss
authorOrakaro <nhatminh_179@hotmail.com>
Tue, 27 May 2014 15:36:03 +0000 (00:36 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Tue, 27 May 2014 15:36:03 +0000 (00:36 +0900)
rainbowstream/config.py
rainbowstream/rainbow.py
screenshot/RainbowStreamv0.0.1.png

index a83ef43..518b090 100644 (file)
@@ -1,5 +1,16 @@
 # This is RainbowStream App info
 CONSUMER_KEY = 'Xk1DGhR1FJa4xjg7GbdogzLJw'
 CONSUMER_SECRET = 'SpHtDmbSGCSm55AAlIeb2PsD3kGEzxyo1325rJgrND5abeOh2T'
+
+# Max Search record
 SEARCH_MAX_RECORD = 5
+# Default home tweet
 HOME_TWEET_NUM = 5
+
+
+# Stream Domain
+USER_DOMAIN = 'userstream.twitter.com',
+PUBLIC_DOMAIN = 'stream.twitter.com',
+SITE_DOMAIN = 'sitestream.twitter.com',
+# Actually called
+DOMAIN = USER_DOMAIN
index a2d0c38..9a30b47 100644 (file)
@@ -9,7 +9,6 @@ import os
 import os.path
 import argparse
 import sys
-import time
 import signal
 
 from twitter.stream import TwitterStream, Timeout, HeartbeatTimeout, Hangup
@@ -366,7 +365,7 @@ def stream():
     # Get stream
     stream = TwitterStream(
         auth=authen(),
-        domain='userstream.twitter.com',
+        domain=DOMAIN,
         **stream_args)
     tweet_iter = stream.user(**query_args)
 
index e9a9855..3a6bab6 100644 (file)
Binary files a/screenshot/RainbowStreamv0.0.1.png and b/screenshot/RainbowStreamv0.0.1.png differ