import urllib
str0='<a title="" target="_blank" href="http://blog.sina.com.cn/s/blog_4701280b0102eo83.html">'
href=str0.find('href=')
html=str0.find('.html')
print href,html
url=str0[href+6:html+5]
content=urllib.urlopen(url).read()
filename=url[-26:]
open(filename,'w').write(content)
str0='<a title="" target="_blank" href="http://blog.sina.com.cn/s/blog_4701280b0102eo83.html">'
href=str0.find('href=')
html=str0.find('.html')
print href,html
url=str0[href+6:html+5]
content=urllib.urlopen(url).read()
filename=url[-26:]
open(filename,'w').write(content)