mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-08-02 20:52:29 +02:00
urlparse for python3
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user