mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-30 08:10:46 +02:00
commit
6ff2816d95
@ -221,7 +221,7 @@ def print_doujinshi(doujinshi_list):
|
|||||||
|
|
||||||
def search_parser(keyword, sorting, page):
|
def search_parser(keyword, sorting, page):
|
||||||
logger.debug('Searching doujinshis using keywords {0}'.format(keyword))
|
logger.debug('Searching doujinshis using keywords {0}'.format(keyword))
|
||||||
keyword = '+'.join([i.strip().replace(' ', '-').lower() for i in keyword.split(',')])
|
# keyword = '+'.join([i.strip().replace(' ', '-').lower() for i in keyword.split(',')])
|
||||||
result = []
|
result = []
|
||||||
i = 0
|
i = 0
|
||||||
while i < 5:
|
while i < 5:
|
||||||
@ -229,12 +229,8 @@ def search_parser(keyword, sorting, page):
|
|||||||
url = request('get', url=constant.SEARCH_URL, params={'query': keyword, 'page': page, 'sort': sorting}).url
|
url = request('get', url=constant.SEARCH_URL, params={'query': keyword, 'page': page, 'sort': sorting}).url
|
||||||
response = request('get', url.replace('%2B', '+')).json()
|
response = request('get', url.replace('%2B', '+')).json()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
i += 1
|
logger.critical(str(e))
|
||||||
if not i < 5:
|
|
||||||
logger.critical(str(e))
|
|
||||||
logger.warn('If you are in China, please configure the proxy to fu*k GFW.')
|
|
||||||
exit(1)
|
|
||||||
continue
|
|
||||||
break
|
break
|
||||||
|
|
||||||
if 'result' not in response:
|
if 'result' not in response:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user