Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 584 Bytes

File metadata and controls

28 lines (17 loc) · 584 Bytes

dzen_urls_validator

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

How method works?

  1. Add prefix "https://"
  2. Change all hostnames to "dzen.ru"

Examples

from dzen_urls_validator import validate_url

validated_url = validate_url(url='dzen.ru/id/5ce671035b6e3000b303d27a/')
# >> https://dzen.ru/id/5ce671035b6e3000b303d27a

validated_url = validate_url(url='zen.yandex.ru/id/5ce671035b6e3000b303d27a')
# >> https://dzen.ru/id/5ce671035b6e3000b303d27a

Installing

pip3 install dzen_urls_validator