mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-20 02:41:19 +02:00
urlparse for python3
This commit is contained in:
parent
148b4a1a08
commit
6858bacd41
@ -1,6 +1,5 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
|
|
||||||
class _Singleton(type):
|
class _Singleton(type):
|
||||||
""" A metaclass that creates a Singleton base class when called. """
|
""" A metaclass that creates a Singleton base class when called. """
|
||||||
_instances = {}
|
_instances = {}
|
||||||
@ -17,6 +16,8 @@ class Singleton(_Singleton('SingletonMeta', (object,), {})):
|
|||||||
|
|
||||||
def urlparse(url):
|
def urlparse(url):
|
||||||
try:
|
try:
|
||||||
import urlparse
|
from urlparse import urlparse
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import urllib.parse as urlparse
|
import urllib.parse as urlparse
|
||||||
|
|
||||||
|
return urlparse(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user