Registry Mirror
Skip to content

URL Validation: Add support for other schemes apart from https, http, ftp #327

Closed

Description

@dvignacioglobal

Given in the documentation link, the validator does not return True if I use a different scheme such as rtmp or rtsp.

  foo://admin:hunter1@example.com:8042/over/there?name=ferret#nose
  \_/   \___/ \_____/ \_________/ \__/\_________/ \_________/ \__/
   |      |       |       |        |       |          |         |
scheme username password hostname port    path      query    fragment

An example of this is

rtmp://192.168.1.123:1935/live/test

If I run this code:

import validators

streamurl = "rtmp://192.168.1.123:1935/live/test"
print(validators.url(streamurl))

The output is:

ValidationError(func=url, args={'value': 'rtmp://192.168.1.123:1935/live/test'})

It would be nice if the URL validator supports other schemes. Thanks.

Activity

  1. added
    duplicate
    enhancement
    on Mar 13, 2024
  2. nandgator commented on Mar 21, 2024

    @nandgator
    Collaborator
    "ftp", "ftps", "git", "http", "https",
    "rtmp", "rtmps", "rtsp", "sftp",
    "ssh", "telnet",
    

    Apart from these, do you have any other protocols in mind that follows a similar scheme://netloc/path;parameters?query#fragment syntax?

  3. dvignacioglobal commented on Mar 21, 2024

    @dvignacioglobal
    Author

    Thanks for replying! I have nothing more to add to the list.

  4. nyuware commented on Jun 7, 2024

    @nyuware

    Opening the issue again, would it be possible to parse all the available schemes from IANA available here instead of hardcoding a list ? Like it's already being done for the TLDS
    Thanks!

  5. nandgator commented on Jun 8, 2024

    @nandgator
    Collaborator

    parse all the available schemes from IANA

    Would be impractical. Hence to cover as much as possible #352 exists.

  6. tofetpuzo commented on Jun 25, 2024

    @tofetpuzo
    Contributor

    is this feature still live?

  7. nandgator commented on Jun 26, 2024

    @nandgator
    Collaborator

    is this feature still live?

    What are you referring to specifically?

  8. tofetpuzo commented on Jun 27, 2024

    @tofetpuzo
    Contributor

    is this feature still live?

    What are you referring to specifically?

    Hey @yozachar here -> "feature add non-exhaustive Url validation"

  9. nandgator commented on Jun 27, 2024

    @nandgator
    Collaborator

    is this feature still live?

    What are you referring to specifically?

    Hey @yozachar here -> "feature add non-exhaustive Url validation"

    Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions