【python】xsspider零碎知识点

1.提取url信息 urlparse()

from urlparse import urlparse

url = "http://scrapy-chs.readthedocs.io/zh_CN/1.0/topics/items.html"
urlparse(url)
#ParseResult(scheme='http', netloc='scrapy-chs.readthedocs.io', path='/zh_CN/1.0/topics/items.html', params='', query='', fragment='')

 

posted @ 2017-04-07 16:52  匡子语  阅读(173)  评论(0编辑  收藏  举报