Skip to content

Add netloc function for url #10357

@imfht

Description

@imfht

Use case
I have some url with different port like http://a.com:8080/,http://a.com:8081/. and I want get a.com:8080 a.com:8081.

Describe the solution you'd like
select netloc('http://a.com:8080') -> a.com:8080
select netloc('http://b.com:8080') -> a.com:8081

Describe alternatives you've considered
Look like this is no good way to do is now

Additional context
python urllib moule support this:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions