from urllib.parse import urlparse
-BASE_URL = os.getenv('NHENTAI', 'https://nhentai.net')
+BASE_URL = os.getenv('NHENTAI', 'https://ehentai.to')
__api_suspended_DETAIL_URL = '%s/api/gallery' % BASE_URL
CHALLENGE_URL = '%s/challenge' % BASE_URL
FAV_URL = '%s/favorites/' % BASE_URL
-u = urlparse(BASE_URL)
-IMAGE_URL = '%s://i.%s/galleries' % (u.scheme, u.hostname)
+IMAGE_URL = 'https://t.dogehls.xyz/galleries'
NHENTAI_HOME = os.path.join(os.getenv('HOME', tempfile.gettempdir()), '.nhentai')
NHENTAI_HISTORY = os.path.join(NHENTAI_HOME, 'history.sqlite3')
doujinshi_info = html.find('div', attrs={'id': 'info'})
title = doujinshi_info.find('h1').text
- pretty_name = doujinshi_info.find('h1').find('span', attrs={'class': 'pretty'}).text
+ pretty_name = doujinshi_info.find('h1').text
subtitle = doujinshi_info.find('h2')
doujinshi['name'] = title
doujinshi['img_id'] = img_id.group(1)
doujinshi['ext'] = ext
- for _ in doujinshi_info.find_all('div', class_='tag-container field-name'):
- if re.search('Pages:', _.text):
- pages = _.find('span', class_='name').string
+ for _ in doujinshi_info.find_all('div'):
+ if re.search(' pages', _.text):
+ pages = _.text.replace(" pages", "")
doujinshi['pages'] = int(pages)
# gain information of the doujinshi