babac3.py 文件源码

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

项目:sopel-modules 作者: normcyr 项目源码 文件源码
def login(username, password):

    # Cookie Jar
    cj = cookiejar.CookieJar()
    s = requests.Session()
    s.cookies = cj

    br = mechanicalsoup.StatefulBrowser(soup_config={'features': 'lxml'}, session=s)
    login_url = "http://cyclebabac.com/wp-login.php"

    # Perform the actual login
    br.open(login_url)
    br.select_form('#loginform')
    br['log'] = str(username)
    br['pwd'] = str(password)
    br.submit_selected()

    return br
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号