pyhton

http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=

http://whois.chinaz.com/

beautifulsoup4

import xml.dom.minidom
import urllib
name = "baidu.com"
text = urllib.urlopen("http://panda.www.net.cn/cgi-bin/check.cgi?area_domain="+name)
# req = urllib.urlopen("http://whois.chinaz.com/"+name)
text = text.read().decode("gb2312").encode("utf-8")
text = text.replace(" encoding=\"gb2312\"?>"," encoding=\"utf-8\"?>")
print text
doc = xml.dom.minidom.parseString(text)
print doc.getElementsByTagName("original").parseString()

上一篇:最少步数(bfs)


下一篇:dfs和bfs的区别