From 7aecd2b4ca4a2dc05146c49aaa44fffdf16fa5bd Mon Sep 17 00:00:00 2001 From: dngfx Date: Sun, 9 Sep 2018 13:12:06 +0100 Subject: WOOP WOOP THAT'S THE SOUND OF LINKS FOR TWEETS --- modules/bitly.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/bitly.py') diff --git a/modules/bitly.py b/modules/bitly.py index afcc1522..cd69bb4e 100644 --- a/modules/bitly.py +++ b/modules/bitly.py @@ -16,7 +16,8 @@ class Module(object): usage="") def shortlink(self, event): - url = event["url"] + url = event if type(event) is str else event["url"] + if not re.match(REGEX_URL, url): url = "http://%s" % url data = Utils.get_url(URL_BITLYSHORTEN, get_params={ -- cgit v1.3.1-10-gc9f91