From 6b97777b7d782fba1e076331bebe24c710172dd2 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Wed, 12 Jun 2019 22:48:41 +0800 Subject: [PATCH] fix bug --- nhentai/constant.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nhentai/constant.py b/nhentai/constant.py index 11c0d02..121266b 100644 --- a/nhentai/constant.py +++ b/nhentai/constant.py @@ -2,7 +2,12 @@ from __future__ import unicode_literals, print_function import os import tempfile -from nhentai.utils import urlparse + +try: + from urlparse import urlparse +except ImportError: + from urllib.parse import urlparse + BASE_URL = os.getenv('NHENTAI', 'https://nhentai.net')