diff --git a/README.rst b/README.rst index add2b63..e336720 100644 --- a/README.rst +++ b/README.rst @@ -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: diff --git a/nhentai/command.py b/nhentai/command.py index 2dad43f..41ba40e 100644 --- a/nhentai/command.py +++ b/nhentai/command.py @@ -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] diff --git a/nhentai/constant.py b/nhentai/constant.py index ecbee17..5641618 100644 --- a/nhentai/constant.py +++ b/nhentai/constant.py @@ -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 diff --git a/nhentai/parser.py b/nhentai/parser.py index 081e85a..0024f55 100644 --- a/nhentai/parser.py +++ b/nhentai/parser.py @@ -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 = ''