gchar.resources.sites¶
list_available_sites¶
-
gchar.resources.sites.
list_available_sites
() → List[str][source]¶ List the available supported image website names.
- Returns:
The list of supported website names.
- Return type:
List[str]
- Examples::
>>> from gchar.resources.sites import list_available_sites >>> >>> list_available_sites() ['anime_pictures', 'atfbooru', 'danbooru', 'hypnohub', 'konachan', 'konachan_net', 'lolibooru', 'rule34', 'safebooru', 'sankaku', 'xbooru', 'yande', 'zerochan']
get_site_tag¶
-
gchar.resources.sites.
get_site_tag
(ch: Union[gchar.games.base.character.Character, str], site: str, sure_only: bool = False, with_posts: bool = False, allow_fuzzy: bool = False, **kwargs) → Optional[Union[str, Tuple[str, int]]][source]¶ Get a single tag for a character and site.
- Parameters:
ch (Union[Character, str]) – The character instance or name.
site (str) – The name of the site.
sure_only (bool) – Whether to include only sure tags.
with_posts (bool) – Whether to include the number of posts for the tag.
allow_fuzzy (bool) – Whether to allow fuzzy matching of character names.
kwargs – Additional arguments for character retrieval.
- Returns:
The tag for the character and site.
- Return type:
Union[str, Tuple[str, int], None]
- Examples:
>>> from gchar.resources.sites import get_site_tag >>> >>> get_site_tag('amiya', 'danbooru') 'amiya_(arknights)' >>> get_site_tag('surtr', 'danbooru') 'surtr_(arknights)' >>> get_site_tag('surtr', 'danbooru', with_posts=True) ('surtr_(arknights)', 2666) >>> get_site_tag('surtr', 'zerochan') 'Surtr (Arknights)' >>> get_site_tag('surtr', 'anime_pictures') 'surtr (arknights)' >>> get_site_tag('surtr', 'anime_pictures', with_posts=True) ('surtr (arknights)', 471)