utils.py 文件源码

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

项目:parsel-cli 作者: rmax 项目源码 文件源码
def fix_parsel_parser(new_type='html_html', base_type='html'):
    """Fix a custom parser for parsel using lxml.html.HTMLParser.

    The main reason is to have handy helpers as make_links_absolute method.
    """
    selector._ctgroup[new_type] = selector._ctgroup[base_type].copy()
    selector._ctgroup[new_type]['_parser'] = lxml_html.HTMLParser
    return new_type
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号