Changed method of adding http:// sot URLS

This commit is contained in:
Luke Rogers 2012-04-23 07:44:25 +12:00
parent 240440ac13
commit 36dcf308d3
2 changed files with 2 additions and 4 deletions

View file

@ -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 not url.startswith("http"):
if not "://" in url:
url = "http://" + url
try:
# get the title