gruns / furl

🌐 URL parsing and manipulation made easy.
Other
2.6k stars 151 forks source link

Feature requests: get url relative to another url #161

Open fnep opened 1 year ago

fnep commented 1 year ago

I just started using furl in a project. The only thing I miss a method to get the url relative to some other url. Maybe i did not find the way to do it, but i assume this is a feature request.

Something like this …

>>> furl("http://a.com/a/b/c").relative_to("http://a.com/a/b/d")
furl('../d')

... while keeping the domain in mind …

>>> furl("http://a.com/a/b/c").relative_to("http://b.com/a/b/d")
furl('http://b.com/a/b/d')

This would be a grad addition.