Skip to content

Wiped-Out/telegram_urls_validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telegram_urls_validator

Library for validating Telegram urls and brings them to one standart.

How method works?

  1. Add prefix "https://"
  2. Change all hostnames to "t.me"
  3. Convert "/+" invite links to "/joinchat/" type

Examples

from telegram_urls_validator import validate_url

validated_url = validate_url(url='t.me/PavelDurov')
# >> https://t.me/PavelDurov

validated_url = validate_url(url='telegram.me/PavelDurov')
# >> https://t.me/PavelDurov


validated_url = validate_url(url='t.me/+invitehash')
# >> https://t.me/joinchat/invitehash

Installing

pip3 install telegram_urls_validator

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages