]> git.lizzy.rs Git - nhentai.git/blob - nhentai/constant.py
Use ehentai.to / dogehls.xyz mirrors
[nhentai.git] / nhentai / constant.py
1 # coding: utf-8
2
3 import os
4 import tempfile
5
6 try:
7     from urlparse import urlparse
8 except ImportError:
9     from urllib.parse import urlparse
10
11
12 BASE_URL = os.getenv('NHENTAI', 'https://ehentai.to')
13
14 __api_suspended_DETAIL_URL = '%s/api/gallery' % BASE_URL
15
16 DETAIL_URL = '%s/g' % BASE_URL
17 SEARCH_URL = '%s/api/galleries/search' % BASE_URL
18
19
20 TAG_API_URL = '%s/api/galleries/tagged' % BASE_URL
21 LOGIN_URL = '%s/login/' % BASE_URL
22 CHALLENGE_URL = '%s/challenge' % BASE_URL
23 FAV_URL = '%s/favorites/' % BASE_URL
24
25 IMAGE_URL = 'https://t.dogehls.xyz/galleries'
26
27 NHENTAI_HOME = os.path.join(os.getenv('HOME', tempfile.gettempdir()), '.nhentai')
28 NHENTAI_HISTORY = os.path.join(NHENTAI_HOME, 'history.sqlite3')
29 NHENTAI_CONFIG_FILE = os.path.join(NHENTAI_HOME, 'config.json')
30
31 CONFIG = {
32     'proxy': {'http': '', 'https': ''},
33     'cookie': '',
34     'language': '',
35     'template': '',
36     'useragent': 'nhentai command line client (https://github.com/RicterZ/nhentai)'
37 }
38
39 LANGUAGEISO ={
40     'english' : 'en',
41     'chinese' : 'zh',
42     'japanese' : 'ja',
43     'translated' : 'translated'
44 }