Skip to content

survtur/TelethonMessageToHtmlConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

TelethonMessageToHtmlConverter

Telegram/Telethon message with entities to HTML converter. It needs message and entities fields from telethon.tl.custom.message.Message objects. Use it like this:

from html_conv import MessageToHtmlConverter
    
for msg in tg_client.iter_messages(invite_link):
    converter = MessageToHtmlConverter(msg.message, msg.entities)
    html = converter.html

Not all MessageEntity* items are processing. You may add new one to _ENTITIES_TO_TAG dict.

See also

About

Telegram/Telethon message with entities to HTML converter.

Topics

Resources

License

Stars

Watchers

Forks

Languages