将相对URL应用于绝对URL

Jef*_*rth 9 python url

我有一个绝对URL,以及该页面上的链接指向的URL.是否有内置函数将相对URL应用于绝对URL?

IE浏览器." http://example.com/some/url","/ some/url/I/want/to/go/to"=>" http://example.com/some/url/I/want/to/go/to "

Ign*_*ams 9

urlparse.urljoin() 做到这一点.