url.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:krauler 作者: occrp-attic 项目源码 文件源码
def normalize_url(url):
    # TODO: learn from https://github.com/hypothesis/h/blob/master/h/api/uri.py
    try:
        url = urlnorm.norm(url)
        url, _ = urldefrag(url)
        url = re.sub('[\n\r]', '', url)
        url = url.rstrip('/')
        return url
    except:
        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号