aboutsummaryrefslogtreecommitdiff
path: root/modules/tweets/format.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-25 17:53:00 +0100
committerGravatar jesopo2019-06-25 17:53:00 +0100
commit12181bfec6c3219571d50779a21e649f23e2b030 (patch)
tree957f74cce2eea46a53bd643e46d4e576012d4e2d /modules/tweets/format.py
parentcatch and format "unknown record type" exceptions (diff)
signature
Add system to have multiple url shorteners and chose which to use
Diffstat (limited to 'modules/tweets/format.py')
-rw-r--r--modules/tweets/format.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/tweets/format.py b/modules/tweets/format.py
index c41fde17..090ec6cd 100644
--- a/modules/tweets/format.py
+++ b/modules/tweets/format.py
@@ -6,7 +6,7 @@ def _timestamp(dt):
since, unit = utils.time_unit(seconds_since)
return "%s %s ago" % (since, unit)
-def _tweet(exports, tweet):
+def _tweet(exports, server, tweet):
linked_id = tweet.id
username = tweet.user.screen_name
@@ -17,7 +17,7 @@ def _tweet(exports, tweet):
tweet_link = "https://twitter.com/%s/status/%s" % (username,
linked_id)
- short_url = exports.get_one("shortlink")(tweet_link)
+ short_url = exports.get_one("shorturl")(server, tweet_link)
short_url = " - %s" % short_url if short_url else ""
created_at = _timestamp(tweet.created_at)