()
return output
Get emoji alias from Github API
Get emoji alias from Github API
Get emoji alias from Github API
def get_emoji_from_github_api() -> dict:
    """Get emoji alias from Github API
    """

    data = requests.get("https://api.github.com/emojis").json()
    pattern = re.compile(r"unicode/([0-9a-fA-F-]+)\.[a-z]+")

    output = {}
    for name, img in data.items():
        m = pattern.search(img)
        if m:
            emj = "".join(chr(int(h, 16)) for h in m.group(1).split('-'))
            output[name] = emj
        else:
            pass # Special Github emoji that is not part of Unicode

    return output
def get_emoji_from_github_api ( ) -> dict : data = requests . get ( "https://api.github.com/emojis" ) . json ( ) pattern = re . compile ( r"unicode/([0-9a-fA-F-]+)\.[a-z]+" ) output = { } for name , img in data . items ( ) : m = pattern . search ( img ) if m : emj = "" . join ( chr ( int ( h , 16 ) ) for h in m . group ( 1 ) . split ( '-' ) ) output [ name ] = emj else : pass # Special Github emoji that is not part of Unicode return output