2 from __future__ import unicode_literals, print_function
8 from urlparse import urlparse
10 from urllib.parse import urlparse
13 BASE_URL = os.getenv('NHENTAI', 'https://nhentai.net')
15 __api_suspended_DETAIL_URL = '%s/api/gallery' % BASE_URL
17 DETAIL_URL = '%s/g' % BASE_URL
18 SEARCH_URL = '%s/api/galleries/search' % BASE_URL
21 TAG_API_URL = '%s/api/galleries/tagged' % BASE_URL
22 LOGIN_URL = '%s/login/' % BASE_URL
23 CHALLENGE_URL = '%s/challenge' % BASE_URL
24 FAV_URL = '%s/favorites/' % BASE_URL
26 u = urlparse(BASE_URL)
27 IMAGE_URL = '%s://i.%s/galleries' % (u.scheme, u.hostname)
29 NHENTAI_HOME = os.path.join(os.getenv('HOME', tempfile.gettempdir()), '.nhentai')
30 NHENTAI_HISTORY = os.path.join(NHENTAI_HOME, 'history.sqlite3')
31 NHENTAI_CONFIG_FILE = os.path.join(NHENTAI_HOME, 'config.json')
35 'proxy': {'http': '', 'https': ''},