mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-20 02:41:19 +02:00
get nhentai url from env
This commit is contained in:
parent
441317c28c
commit
2f756ecb5b
@ -1,6 +1,9 @@
|
|||||||
SCHEMA = 'http://'
|
import os
|
||||||
|
|
||||||
|
SCHEMA = os.getenv('NHENTAI_SCHEMA', 'http://')
|
||||||
# BASE_URL = 'nhentai.net'
|
# BASE_URL = 'nhentai.net'
|
||||||
BASE_URL = 'nhentai.ricterz.me'
|
BASE_URL = os.getenv('NHENTAI', 'nhentai.ricterz.me')
|
||||||
|
|
||||||
URL = '%s%s' % (SCHEMA, BASE_URL)
|
URL = '%s%s' % (SCHEMA, BASE_URL)
|
||||||
DETAIL_URL = '%s/g' % URL
|
DETAIL_URL = '%s/g' % URL
|
||||||
SEARCH_URL = '%s/search/' % URL
|
SEARCH_URL = '%s/search/' % URL
|
||||||
|
@ -90,6 +90,9 @@ def search_parser(keyword, page):
|
|||||||
title = (title[:85] + '..') if len(title) > 85 else title
|
title = (title[:85] + '..') if len(title) > 85 else title
|
||||||
id_ = re.search('/g/(\d+)/', doujinshi.a['href']).group(1)
|
id_ = re.search('/g/(\d+)/', doujinshi.a['href']).group(1)
|
||||||
result.append({'id': id_, 'title': title})
|
result.append({'id': id_, 'title': title})
|
||||||
|
if not result:
|
||||||
|
logger.warn('Not found anything of keyword {}'.format(keyword))
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user