Fix for python 3.3
This commit is contained in:
parent
ca17332942
commit
e7436d7d79
1 changed files with 5 additions and 2 deletions
|
@ -6,7 +6,10 @@ import shutil
|
|||
import re
|
||||
import os
|
||||
import multiprocessing
|
||||
import urlparse
|
||||
try:
|
||||
from urllib.parse import urlsplit
|
||||
except ImportError:
|
||||
from urlparse import urlsplit
|
||||
from itertools import islice
|
||||
from unittest import TestCase
|
||||
from dosagelib import scraper
|
||||
|
@ -14,7 +17,7 @@ from dosagelib import scraper
|
|||
|
||||
def get_host(url):
|
||||
"""Get host part of URL."""
|
||||
return urlparse.urlsplit(url)[1].lower()
|
||||
return urlsplit(url)[1].lower()
|
||||
|
||||
|
||||
# Dictionary with per-host locks.
|
||||
|
|
Loading…
Reference in a new issue