mirror of
https://github.com/RicterZ/nhentai.git
synced 2026-04-18 23:05:33 +02:00
feat: use exact artist lookup instead of fuzzy search
--artist now calls parser.artist() which resolves the artist name to a
tag id via the /tags/artist/{slug} endpoint, then queries /galleries/tagged
for exact results. BaseParser.artist() defaults to search('artist:...')
as fallback for plugins that don't implement it.
Fixes #430
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,9 @@ class BaseParser(ABC):
|
||||
@abstractmethod
|
||||
def search(self, keyword: str, sorting: str = 'date', page=None, **kwargs) -> List[Dict]: ...
|
||||
|
||||
def artist(self, artist_name: str, sorting: str = 'date', page=None, **kwargs) -> List[Dict]:
|
||||
return self.search(f'artist:{artist_name}', sorting=sorting, page=page, **kwargs)
|
||||
|
||||
def favorites(self, page=None) -> List[Dict]:
|
||||
return []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user