import urllib2
str1='<a title="xxxx" target="_blank" href="http://xxxx.html">xxxx</a>'
href=str1.find(r'href')
url=str1.find(r'.html')
html = str1[href+6:url+5]
content = urllib2.urlopen(html).read()
print content
转载于:https://blog.51cto.com/ovens/1329781