fixed language tag

This commit is contained in:
Alocks 2019-12-07 17:50:23 -03:00
parent 6156cf5914
commit fe4fb46e30
4 changed files with 7 additions and 6 deletions

View File

@ -90,13 +90,13 @@ Download by character name:
.. code-block:: bash
nhentai --character kuro von einsbern --download
nhentai --character "kuro von einsbern" --download
Download by parody name:
.. code-block:: bash
nhentai --parody the idolmaster --download
nhentai --parody "the idolmaster" --download
Download by group name:
@ -108,7 +108,7 @@ Download using multiple tags (--tag, --character, --paordy and --group supported
.. code-block:: bash
nhentai --tag lolicon, teasing --artist tamano kedama, atte nanakusa
nhentai --tag "lolicon, teasing" --artist "tamano kedama, atte nanakusa"
Download your favorites with delay:

View File

@ -71,7 +71,7 @@ def main():
doujinshi_ids = [i['id'] for i in doujinshis]
elif options.language:
doujinshis = tag_parser(options.group, max_page=options.max_page, index=5)
doujinshis = tag_parser(options.language, max_page=options.max_page, index=5)
print_doujinshi(doujinshis)
if options.is_download and doujinshis:
doujinshi_ids = [i['id'] for i in doujinshis]

View File

@ -21,7 +21,8 @@ TAG_URL = ['%s/tag' % BASE_URL,
'%s/artist' % BASE_URL,
'%s/character' % BASE_URL,
'%s/parody' % BASE_URL,
'%s/group' % BASE_URL]
'%s/group' % BASE_URL,
'%s/language' % BASE_URL]
TAG_API_URL = '%s/api/galleries/tagged' % BASE_URL
LOGIN_URL = '%s/login/' % BASE_URL

View File

@ -198,7 +198,7 @@ def tag_parser(tag_name, sorting='date', max_page=1, index=0):
if ',' in tag_name:
tag_name = [i.strip().replace(' ', '-') for i in tag_name.split(',')]
else:
tag_name = tag_name.replace(' ', '-')
tag_name = tag_name.strip().replace(' ', '-')
if sorting == 'date':
sorting = ''