python 分析网页链接 连通性


最简单的方法:
# -*- coding:utf-8 -*-
from urllib import urlopen
url = None
try:
 url = urlopen('http://localhost/')
 s= url.getcode()
except:
 s= '连接不存在!'
print s
 
 
 

相关内容

    暂无相关文章

评论关闭