import urllib.parse
url = (
    """http://www.domain.com/img?res=high&refurl=http://www.ahother_domain.com/page/&imgurl=http://www.one_more.com/static/images/mercedes.jpg&w=640&h=480"""
    )
urlParams = urllib.parse.parse_qs(urllib.parse.urlparse(url).query)
urlInUrl = urlParams['imgurl']
print(urlInUrl)
How to find URL in another URL?