2019广西普法考试云平台自动登录考试python

需要考试的答案下载链接:http://www.gongxukexuexi.com/2019%E6%99%AE%E6%B3%95%E8%80%83%E8%AF%95%E7%AD%94%E6%A1%88%E8%87%AA%E5%8A%A8%E8%80%83%E8%AF%95.py.txt



na = browser.find_element_by_xpath('//*[@id="username"]')#这个是用户名

na.send_keys('这里输入账号名字')

mi = browser.find_element_by_xpath('//*[@id="password"]')#这个是密码

mi.send_keys('密码输入')

html = browser.page_source# 获取网页内容

html = bs(html,'lxml')

>>> html.text
'\n广西普法云平台\n\n\n\n广西普法云平台\n\n\n\n\n\n\n\n        body{\n            background: url(content/images/img-login-bg.png) top center no-repeat;\n            background-size: 100% 100%;\n            /* background: -webkit-linear-gradient(-30deg, rgba(210, 212, 223, 1) , rgba(151, 159, 182, 1));\n            background: -o-linear-gradient(-30deg, rgba(210, 212, 223, 1) , rgba(151, 159, 182, 1));\n            background: -moz-linear-gradient(-30deg, rgba(210, 212, 223, 1) , rgba(151, 159, 182, 1));\n            background: linear-gradient(to -30deg, rgba(210, 212, 223, 1) , rgba(151, 159, 182, 1)); */\n            overflow: auto;\n        }\n    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n关注广西普法,\n\n\n\n\n\n\n\n\n\n\n\n×\nddf\n\n\ndfdfd\n\n\n\n\n\n\n\n跳转到APP下载页\n\n\n\n\n\n\n\n\n\ndocument.write(\'
                    
                    

你可能感兴趣的:(爬虫)