Modernized some code.
This commit is contained in:
parent
6c31f313fd
commit
b35868c0f1
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ def get_title(url):
|
||||||
url = urlnorm.normalize(url.encode('utf-8'))
|
url = urlnorm.normalize(url.encode('utf-8'))
|
||||||
url = url.decode('utf-8')
|
url = url.decode('utf-8')
|
||||||
# add http if its missing
|
# add http if its missing
|
||||||
if url[:7] != "http://" and url[:8] != "https://":
|
if not url.startswith("http"):
|
||||||
url = "http://" + url
|
url = "http://" + url
|
||||||
try:
|
try:
|
||||||
# get the title
|
# get the title
|
||||||
|
|
Reference in a new issue