4
0
mirror of https://github.com/RicterZ/nhentai.git synced 2025-05-05 19:10:59 +02:00

urlparse for python3

This commit is contained in:
Ricter Z 2016-10-17 21:50:07 +08:00
parent 148b4a1a08
commit 6858bacd41

@ -1,6 +1,5 @@
# coding: utf-8
class _Singleton(type):
""" A metaclass that creates a Singleton base class when called. """
_instances = {}
@ -17,6 +16,8 @@ class Singleton(_Singleton('SingletonMeta', (object,), {})):
def urlparse(url):
try:
import urlparse
from urlparse import urlparse
except ImportError:
import urllib.parse as urlparse
return urlparse(url)