From 6749bf8340f3a97b5f420c864f29fdd4f3b4e368 Mon Sep 17 00:00:00 2001 From: neersighted Date: Wed, 7 Mar 2012 09:37:37 -0800 Subject: [PATCH] Fixed (I hope) the same bug with https:// --- plugins/shorten.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/shorten.py b/plugins/shorten.py index 9ba15bd..8a028a4 100755 --- a/plugins/shorten.py +++ b/plugins/shorten.py @@ -15,9 +15,9 @@ class ShortenError(Exception): def bitly(url, user, apikey): try: - if url[:7] != "http://": - if url[:8] == "https://": - url = url + if url[:8] == "https://": + pass + elif url[:7] != "http://": url = "http://" + url params = urlencode({'longUrl': url, 'login': user, 'apiKey': apikey, 'format': 'json'}) j = http.get_json("http://api.bit.ly/v3/shorten?%s" % params)