From b35868c0f1484f695e9fd35e5afa52c86665dafd Mon Sep 17 00:00:00 2001 From: lukeroge Date: Wed, 28 Mar 2012 11:24:20 +1300 Subject: [PATCH] Modernized some code. --- plugins/urlparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/urlparse.py b/plugins/urlparse.py index e2ea215..b4f47d5 100755 --- a/plugins/urlparse.py +++ b/plugins/urlparse.py @@ -8,7 +8,7 @@ def get_title(url): url = urlnorm.normalize(url.encode('utf-8')) url = url.decode('utf-8') # add http if its missing - if url[:7] != "http://" and url[:8] != "https://": + if not url.startswith("http"): url = "http://" + url try: # get the title