def get_info(host):
"""get some infomation of a host"""
req = ''
try:
req = requests.get(host,timeout=10)
req.encoding = req.apparent_encoding
result = re.findall(re.compile('<title>(.*?)</title>',re.L),req.text)
return result[0]
except Exception as e:
print(e)
return None
#----------------------------------------------------------------------
评论列表
文章目录