gesistsa / adaR

:computer: wrapper for ada-url a WHATWG-compliant and fast URL parser written in modern C++
https://gesistsa.github.io/adaR/
Other
26 stars 2 forks source link

ada_get_domain() doesnt work if path present #51

Closed schochastics closed 11 months ago

schochastics commented 11 months ago
adaR::ada_get_domain("http://sub.google.de/test")
#> [1] NA

This is due to public_suffix() not being able to parse URLs with paths

adaR::public_suffix("http://google.de/test")
#> [1] NA
psl::public_suffix("http://google.de/test")
#> [1] "de/test"

Not sure if this should be NA instead of de. But then again, psl also fails. For now, we fix ada_get_domain internally and reconsider public_suffix in #54