黄聪

论SEO对人类的重要性,请看我的博客:hcsem.com

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
    import urllib  
proto, rest
= urllib.splittype("http://www.baidu.com/11/12.htm")
host, rest
= urllib.splithost(rest)
print host
host, port
= urllib.splitport(host)
if port is None:
port
= 80
print port
posted on 2011-09-18 22:02  黄聪  阅读(3458)  评论(1编辑  收藏  举报