mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-07-01 16:09:28 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
4d89b80e67 | |||
4cc4f35a0d | |||
ad86c49de9 | |||
5a538fe82f | |||
eb35ba9848 | |||
b0902c2d58 | |||
320f36c264 | |||
1dae63be39 | |||
8ed1b89277 |
@ -4,13 +4,14 @@ os:
|
|||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- 3.7
|
- 3.7
|
||||||
|
- 3.8
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python setup.py install
|
- python setup.py install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- echo 268642 > /tmp/test.txt
|
- echo 268642 > /tmp/test.txt
|
||||||
- nhentai --cookie "_ga=GA1.2.2000087053.1558179358; __cfduid=d8930f7b43d04e1b2117719e28386b2e31593148489; csrftoken=3914GQGSmmqQyfQTBswNgfXuhFiefu8sAgOnsfZWiiqS4PJpKivuTp34p2USV6xu; sessionid=be0w2lwlprlmld3ahg9i592ipsuaw840"
|
- nhentai --cookie "_ga=GA1.2.1651446371.1545407218; __cfduid=d0ed34dfb81167d2a51a1d6392c1768a81601380350; csrftoken=KRN0GR1ft86m3HTefpQA99pp6R1Bo7hUs5QxNGOAIuwB5g4EcJj04fwMB8QKgLaB; sessionid=7hzoowox78c90wi5ud5ibphm4axcck7c"
|
||||||
- nhentai --search umaru
|
- nhentai --search umaru
|
||||||
- nhentai --id=152503,146134 -t 10 --output=/tmp/ --cbz
|
- nhentai --id=152503,146134 -t 10 --output=/tmp/ --cbz
|
||||||
- nhentai -F
|
- nhentai -F
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
__version__ = '0.4.1'
|
__version__ = '0.4.2'
|
||||||
__author__ = 'RicterZ'
|
__author__ = 'RicterZ'
|
||||||
__email__ = 'ricterzheng@gmail.com'
|
__email__ = 'ricterzheng@gmail.com'
|
||||||
|
@ -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
|
|
||||||
if not i < 5:
|
|
||||||
logger.critical(str(e))
|
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:
|
||||||
|
Reference in New Issue
Block a user