Get link : urlopen « Network « Python Tutorial






import re
from urllib import urlopen
webpage = urlopen('http://www.python.org')

text = webpage.read()
m = re.search('<a href="([^"]+)">Tutorial</a>', text, re.IGNORECASE)
print m.group(1)








21.16.urlopen
21.16.1.Opening Remote Files
21.16.2.Get link