import urllib, re, string pattern = re.compile("""[^""", re.DOTALL) url = 'http://weatheroffice.ec.gc.ca/radar/index_e.html?id=XGO' agent = urllib.URLopener() doc = agent.open(url).read() match = pattern.findall(doc) print 'http://weatheroffice.ec.gc.ca/radar/' + match[0]