标签:mail fonts sts www pass log html print login
import requests
from lxml import etree
# http://www.dajiangtai.com/login/check.do
post_url=‘http://www.dajiangtai.com/login/check.do‘
mysession=requests.Session()
login_data={‘browser‘:‘%E8%B0%B7%E6%AD%8CChrome%2F77.0.3865.90‘,
‘system‘:‘Win7‘,
‘email‘:‘13053972852‘,
‘password‘:‘python123‘,
‘autoLogin‘:‘on‘}
r=mysession.post(post_url,login_data)
myurl=‘http://www.dajiangtai.com/user/course.do‘
res=mysession.get(myurl)
root=etree.HTML(res.text)
my=root.xpath(‘//ul[@class="fontsize0 my-course-list"][@id="mylearn"]//p[@class="my-course-title"]/text()‘)
print(my)
标签:mail fonts sts www pass log html print login
原文地址:https://www.cnblogs.com/tiankong-blue/p/11616120.html