从url获取域名 python
2015-01-16 11:48
447 查看
urllib来解析域名
import urllib print "--"*40 for url in urls: proto, rest = urllib.splittype(url) res, rest = urllib.splithost(rest) print "unkonw" if not res else res
相关文章推荐
- 【Python】 获取url的多级域名
- js取得当前url,javascript获取当前页面url值,js获取域名
- js取得当前url,javascript获取当前页面url值,js获取域名
- ASP.net获取当前url各种属性(文件名、参数、域名 等)的方法
- ASP.net获取当前网址url各种属性(文件名、参数、域名 等)的方法-转
- ASP.net获取当前url各种属性(文件名、参数、域名等)的方法
- 如何用js获取地址栏的URL的域名
- .net获取当前url各种属性(文件名、参数、域名 等)的方法
- asp.net获取当前网址url的各种属性(文件名、参数、域名 等)的代码
- python获取url地址中的参数
- asp.net获取当前网址url的各种属性(文件名、参数、域名 等)的代码
- js取得当前url,javascript获取当前页面url值,js获取域名
- ASP.net获取当前url各种属性(文件名、参数、域名等)的方法
- ASP.net获取当前url属性(文件名、参数、域名 等)的方法
- python模块之 HTMLParser: 解析html,获取url
- js取得当前url,javascript获取当前页面url值,js获取域名
- python模块之HTMLParser: 解析html,获取url
- ASP.net获取当前url各种属性(文件名、参数、域名 等)的方法
- asp.net获取当前网址url的各种属性(文件名、参数、域名 等)的代码
- asp.net获取当前网址url的各种属性(文件名、参数、域名 等)的代码