Skip to content

domain() returns wrong data when URLs contain @ #119

@bart-turczynski

Description

@bart-turczynski
> domain("https://www.tiktok.com/@trener_pawel")
[1] "trener_pawel"

Seems like detecting @ forces the function to assume it's an email address like in cases such as:

> domain("[email protected]")
[1] "domain.com"
> domain("user@domain")
[1] "domain"

A suggested solution would be to create a parameter like type with the default set to url vs email which would either treat a @ as a regular character or "special" character.
Side note:

> domain("user@domain")
[1] "domain"

Not sure if this should return a result, as just domain is not, in fact, a valid domain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions