Given an absolute url of a page, and a relative link found within that page, would there be a way to a) definitively reconstruct or b) best
very simple:
>>> from urlparse import urljoin >>> urljoin('http://mysite.com/foo/bar/x.html', '../../images/img.png') 'http://mysite.com/images/img.png'