urltools icon indicating copy to clipboard operation
urltools copied to clipboard

url_parse does not detect the domain accurately

Open mkhezr opened this issue 6 years ago • 3 comments

I am using urltools::url_parse on a medium.com type of url:

urltools::url_parse("https://medium.com/@mkhezr/plastic-fashion-a-data-story-4c65ff6efc36")

and instead of medium.com being detected as the domain, the writer's username part @mkhezr is:

scheme domain port path parameter fragment https mkhezr <NA> plastic-fashion-a-data-story-4c65ff6efc36 <NA> <NA>

I'm using urltools version 1.7.0

mkhezr avatar Aug 15 '18 17:08 mkhezr

:+1: I was just looking at a similar thing right now.

@Ironholds is this something you think I could help with?

alexcpsec avatar Aug 17 '18 15:08 alexcpsec

@alexcpsec if you want to try tinkering with the logic, go for it! (I have a conference deadline iiin 3 weeks and so am currently only writing in LaTeX :D

Ironholds avatar Aug 18 '18 16:08 Ironholds

side note: while the following won't work on Windows until the hack-ish rwinlib setup updates the compiled libcurl for windows that it downloads on install (shudder), https://github.com/hrbrmstr/curlparse curlparse::parse_curl() parses this URL just fine.

hrbrmstr avatar Dec 08 '18 15:12 hrbrmstr