These are changes to support what will eventually be version 3.2 of
python-twitter; for the time being we are running of a git clone of
the devel branch, which supports the newer twitter API (so e.g. tweets
quoting other tweets work properly); it doesn't look like an upstream
release of 3.2 is going to happen any time soon.
Author: Adam Bernard
Signed-off-by: Matthew Vernon
twitapi = twitter.Api(consumer_key = twoaapck,
consumer_secret = twoaapcs,
access_token_key = twoapat,
- access_token_secret = twoapats)
+ access_token_secret = twoapats,
+ tweet_mode = "extended")
except IOError:
# non-authenticated twitter api instance
twitapi = twitter.Api()
else:
tweeter_screen = "[not returned]" ; tweeter_name = "[not returned]"
tweeter_name = tweeter_name + " RTing " + status.user.name #.encode('UTF-8', 'replace')
- tweetText = status.text
+ tweetText = status.full_text
if status.media:
replacements = defaultdict( list )
for medium in status.media:
stringout = "Error: %s" % terror[1].__str__()
if inclusion:
return stringout # don't want to double-encode it, so just pass it on for now and encode later
- print stringout.encode('UTF-8', 'replace')
return stringout.encode('UTF-8', 'replace')