[root@yyjk /tmp]#cat a1.py
import urllib
import cookielib
import json
import httplib
import re
import requests
import datetime
requests.packages.urllib3.disable_warnings()
from lxml import etree
import StringIO
import time
import ssl
import cx_Oracle
s = requests.session()
fh1=open('fh1.html','r')
fh2=fh1.read()
htmlEmt=etree.HTML(fh2)
print htmlEmt.xpath('//input/@value')
[root@yyjk /tmp]#cat fh1.html
<form id="" autocomplete="on" class="" action="/gui/auth/login/" method="POST" ><input type='hidden' name='csrfmidd
根据input标签获取所有的value对应的值
最新推荐文章于 2022-07-20 11:59:06 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)