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 a83ef43e732a2d82ab97f49ff468e50a506ab43d..518b090670dabfab33e87c5caff6c6feba267445 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 a2d0c381e09a9dc74ecf2e6aaaa615f5b0b3b6cc..9a30b47db5b8241f92dc69939c8f064b5c6810c2 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 e9a98553ee7c4d8732b1b1803b21b2aee37eab34..3a6bab6f8fbbdde5f1842d1b10e876f8f5752c68 100644 (file)
Binary files a/screenshot/RainbowStreamv0.0.1.png and b/screenshot/RainbowStreamv0.0.1.png differ