]> projects.mako.cc - twitter-api-cdsw-solutions/commitdiff
Changed everything to ASCII. I'm worried we'll lose the forest for the \u1f332
authorTommy Guy <richardtguy84@gmail.com>
Mon, 10 Nov 2014 04:16:36 +0000 (20:16 -0800)
committerTommy Guy <richardtguy84@gmail.com>
Mon, 17 Nov 2014 04:21:49 +0000 (20:21 -0800)
tweepy/models.py
twitter-stream1.py
twitter-stream2.py
twitter1.py
twitter2.py
twitter3.py
twitter4.py
twitter_authentication.py

index 1338ab456b37227d895f2128af9942e79417edd0..9b70070887bbb6fa48ea03d15f161cac4f513c3e 100644 (file)
@@ -69,6 +69,11 @@ class Status(Model):
     def parse(cls, api, json):
         status = cls(api)
         for k, v in json.items():
+            
+            # Hack by guyrt to fix unicode issues, which we do *not* want to teach.
+            if isinstance(v, basestring):
+                v = v.encode('ascii', errors='ignore')
+
             if k == 'user':
                 user_model = getattr(api.parser.model_factory, 'user') if api else User
                 user = user_model.parse(api, v)
index 1127d4a22117839603c8787d03fcf901681825c8..06f7be07d3046b523e9ff79b789aef17cfacbb00 100644 (file)
@@ -1,7 +1,7 @@
 import tweepy
-from twitter_authentication import API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
+from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
 
-auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
+auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
 auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
 
 api = tweepy.API(auth)
index 59e0cf27033393cf33d009ba9e0adefa7e37d218..ce905ead89cc63880f680b6e17101ccbe830a201 100644 (file)
@@ -1,7 +1,7 @@
 import tweepy
-from twitter_authentication import API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
+from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
 
-auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
+auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
 auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
 
 api = tweepy.API(auth)
index fe0791da8d53fb49357707802c0ac486822b9983..cee5967f12fc26fb1b4bb479017188258ed5b29c 100644 (file)
@@ -1,7 +1,7 @@
 import tweepy
-from twitter_authentication import API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
+from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
 
-auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
+auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
 auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
 
 api = tweepy.API(auth)
index 44197e6f79ccc83cfcbb734294da1a3d2de73dcc..b00b0f76f93925aaa0c2e83870a9d77c185a7f32 100644 (file)
@@ -1,7 +1,7 @@
 import tweepy
-from twitter_authentication import API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
+from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
 
-auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
+auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
 auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
 
 api = tweepy.API(auth)
index aced2beea74c9b95d94250644cb2f61e5a1f7060..897b7b322c7d484b5ea301ebf32eacd2b22d9ba8 100644 (file)
@@ -1,7 +1,7 @@
 import tweepy
-from twitter_authentication import API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
+from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
 
-auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
+auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
 auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
 
 api = tweepy.API(auth)
index b588b1c2ac4b9d259fb5f9f18c9dcd31aece78a2..26d402778f77a96f3d6bbbe8cc1bb342904204e1 100644 (file)
@@ -1,7 +1,7 @@
 import tweepy
-from twitter_authentication import API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
+from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
 
-auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
+auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
 auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
 
 api = tweepy.API(auth)
index 22655dfa86f310cec5f6007eeade2eb3d3cdffa6..141d774c2dd98968814f10cff05b426e5e9c3f71 100644 (file)
@@ -1,4 +1,5 @@
-API_KEY = 'CHANGE_ME'
-API_SECRET = 'CHANGE_ME'
+CONSUMER_KEY = 'CHANGE_ME'
+CONSUMER_SECRET = 'CHANGE_ME'
 ACCESS_TOKEN = 'CHANGE_ME'
 ACCESS_TOKEN_SECRET = 'CHANGE_ME'
+

Benjamin Mako Hill || Want to submit a patch?