开发者

Apply relative URL to an absolute URL

开发者 https://www.devze.com 2022-12-24 04:17 出处:网络
I have an absolute URL, and the URL that a link on that page points to. Is there a b开发者_如何学Gouiltin function to apply a relative URL to an absolute URL?

I have an absolute URL, and the URL that a link on that page points to. Is there a b开发者_如何学Gouiltin function to apply a relative URL to an absolute URL?

Ie. "http://example.com/some/url", "/some/url/I/want/to/go/to" => "http://example.com/some/url/I/want/to/go/to"


urlparse.urljoin() does just this.

0

精彩评论

暂无评论...
验证码 换一张
取 消