caixabreak.py 文件源码

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

项目:caixabreak 作者: kintoandar 项目源码 文件源码
def get_html_tree():
    """Gets and converts the management interface page into a parsable tree."""
    try:
        with requests.Session() as s:
            s.get(_config['base_url'] + _config['welcome_page'],
                  data=_config['welcome_credentials'])
            s.post(_config['base_url'] + _config['login_page'],
                   data=_config['login_credentials'])
            r = s.get(_config['base_url'] + _config['management_page'])
    except Exception as e:
        logging.error(str(e))
        raise e
    return html.fromstring(r.content)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号