自动登陆Discuz论坛的通用python代码源码片段

    user='xxx'
    pwd='xxx'
    dom='http://www.disscuz.net/'
    try:
       flag = login_dz(username=user,password=pwd,domain=dom)
       print(flag)
    except Exception,e:
       print('Error:',e)