emoji module names are not working in python3

Viewed 827

I'm trying to use some emojis like these:

☺️ ☹️ ...

in python 3.

I have read some docs, and they said I can import "emoji" and use emoji module names and I found website that has a lot of module names. this is the link:

https://www.webfx.com/tools/emoji-cheat-sheet/

but none of them worked! (emoji installed by pip3)

Python 3.8.2 (default, Jul 16 2020, 14:00:26) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import emoji
>>> print(emoji.emojize(':joy:'))
:joy:
>>> print(emoji.emojize(':joy:'))
:joy:
>>> print(emoji.emojize(':laughing:'))
:laughing:
>>> print(emoji.emojize(':smile:'))
:smile:

I'm on ubuntu 20.04 LTS.

python3

1 Answers

The webfx doesn't seem to work anymore. I'm not sure why either. The emoji names seem to be following the emojipedia names instead with the spaces replaced with the underscore. A way that you could check is to use print(emoji.demojize(''))

That should return the emoji's name

Related