summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
94aac51)
The previous patch gave you the photo link for the video, not the
video itself; this fixes that (and handles non-ascii better again,
though it's a bit of a hack having to UTF-8 it twice).
patch by adam
for medium in status.media:
if "media_url_https" in medium:
for medium in status.media:
if "media_url_https" in medium:
- tweetText = tweetText.replace(medium["url"], medium["media_url_https"])
+ link = medium["media_url_https"]
+ link = re.sub(r"/tweet_video_thumb/(\w+).jpg", r"/tweet_video/\1.mp4", link)
+ tweetText = tweetText.replace(medium["url"], link)
for url in status.urls:
toReplace = url.expanded_url
for url in status.urls:
toReplace = url.expanded_url
tweetText = tweetText.replace(">",">")
tweetText = tweetText.replace("<","<")
tweetText = tweetText.replace("&","&")
tweetText = tweetText.replace(">",">")
tweetText = tweetText.replace("<","<")
tweetText = tweetText.replace("&","&")
+ tweetText = tweetText.encode('UTF-8', 'replace')
stringout = "tweet by %s (%s): %s" %(tweeter_screen,tweeter_name,tweetText)
except twitter.TwitterError:
stringout = "tweet by %s (%s): %s" %(tweeter_screen,tweeter_name,tweetText)
except twitter.TwitterError: