<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>小学测试</title>
</head>
<body style=" padding:0px; background:#FFF;">
<div class="top" style="height:60px; line-height:60px; font-size:24px; ">
<div class="cont_wrap_gr_b cont_wrap_bj">
<div style="display: none;" id="sin-1" class="question sub-1 13cf2d997284435391a5cd918d52e01c" >
<div class="font_p1" style="border-bottom:solid #81bdeb 1px; padding-bottom:10px;">一、 单项选择题。</div>
<div style="width: 600px;overflow-y: scroll;height: 320px" class="font_p2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="color: #0681DE;">第1题</td>
</tr>
<tr>
<td colspan="2">班级有多少个人( )。</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="13cf2d997284435391a5cd918d52e01c" id="13cf2d997284435391a5cd918d52e01c-972fb99b622b4ff281be8a37f3a1f31d" class="one_answer magic-radio" value="972fb99b622b4ff281be8a37f3a1f31d">
<label for="13cf2d997284435391a5cd918d52e01c-972fb99b622b4ff281be8a37f3a1f31d"></label>
</td>
<td width="91%">
<label>A</label> .
好多</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="13cf2d997284435391a5cd918d52e01c" id="13cf2d997284435391a5cd918d52e01c-23d418651ef04e0b8606bbc085bdb17a" class="one_answer magic-radio" value="23d418651ef04e0b8606bbc085bdb17a">
<label for="13cf2d997284435391a5cd918d52e01c-23d418651ef04e0b8606bbc085bdb17a"></label>
</td>
<td width="91%">
<label>B</label> .
很多 </td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="13cf2d997284435391a5cd918d52e01c" id="13cf2d997284435391a5cd918d52e01c-23d2eac60e624b6e9c3280d9d5ac93a1" class="one_answer magic-radio" value="23d2eac60e624b6e9c3280d9d5ac93a1">
<label for="13cf2d997284435391a5cd918d52e01c-23d2eac60e624b6e9c3280d9d5ac93a1"></label>
</td>
<td width="91%">
<label>C</label> .
不是一般的多</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="13cf2d997284435391a5cd918d52e01c" id="13cf2d997284435391a5cd918d52e01c-92a52d6eac4a4244b966c9cc0574d09a" class="one_answer magic-radio" value="92a52d6eac4a4244b966c9cc0574d09a">
<label for="13cf2d997284435391a5cd918d52e01c-92a52d6eac4a4244b966c9cc0574d09a"></label>
</td>
<td width="91%">
<label>D</label> .
超乎想象</td>
</tr>
</table>
</div>
<div class="question_flag">
<input class="magic-checkbox" type="checkbox" name="flag" onchange="giveFlag(this)" id="flag-13cf2d997284435391a5cd918d52e01c" value="13cf2d997284435391a5cd918d52e01c" >
</div>
<div class="font_p3">
<span style="width: 90px;display: inline-block;"></span>
<a class="btn btn-info" type="button" onclick="showNextDiv(this,2)" style="color:white;"> 下一题 </a>
</div>
</div>
<div style="display: none;" id="sin-2" class="question sub-2 197ebf3b0d7547a1ac37e2393bdd912a" >
<div class="font_p1" style="border-bottom:solid #81bdeb 1px; padding-bottom:10px;">一、 单项选择题。</div>
<div style="width: 600px;overflow-y: scroll;height: 320px" class="font_p2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="color: #0681DE;">第2题</td>
</tr>
<tr>
<td colspan="2">根据《XXXXX》,可能被追究哪些法律责任。( )</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="197ebf3b0d7547a1ac37e2393bdd912a" id="197ebf3b0d7547a1ac37e2393bdd912a-ccbd2d08dfd7420588ff16a5c12c6529" class="one_answer magic-radio" value="ccbd2d08dfd7420588ff16a5c12c6529">
<label for="197ebf3b0d7547a1ac37e2393bdd912a-ccbd2d08dfd7420588ff16a5c12c6529"></label>
</td>
<td width="91%">
<label>A</label> .
对每次违法行为处以100元以上罚款</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="197ebf3b0d7547a1ac37e2393bdd912a" id="197ebf3b0d7547a1ac37e2393bdd912a-34146a538bd34d029bdca7e0a996daa4" class="one_answer magic-radio" value="34146a538bd34d029bdca7e0a996daa4">
<label for="197ebf3b0d7547a1ac37e2393bdd912a-34146a538bd34d029bdca7e0a996daa4"></label>
</td>
<td width="91%">
<label>B</label> .
对每次违法行为处以50元以上罚款</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="197ebf3b0d7547a1ac37e2393bdd912a" id="197ebf3b0d7547a1ac37e2393bdd912a-2537cecbc41644f781ecaaf71fc205b7" class="one_answer magic-radio" value="2537cecbc41644f781ecaaf71fc205b7">
<label for="197ebf3b0d7547a1ac37e2393bdd912a-2537cecbc41644f781ecaaf71fc205b7"></label>
</td>
<td width="91%">
<label>C</label> .
对每次违法行为处以200元以下罚款</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="197ebf3b0d7547a1ac37e2393bdd912a" id="197ebf3b0d7547a1ac37e2393bdd912a-fab78a507b284bb2b3fe64cc675efab4" class="one_answer magic-radio" value="fab78a507b284bb2b3fe64cc675efab4">
<label for="197ebf3b0d7547a1ac37e2393bdd912a-fab78a507b284bb2b3fe64cc675efab4"></label>
</td>
<td width="91%">
<label>D</label> .
对每次违法行为处以100元以上500元以下罚款</td>
</tr>
</table>
</div>
<div class="question_flag">
<input class="magic-checkbox" type="checkbox" name="flag" onchange="giveFlag(this)" id="flag-197ebf3b0d7547a1ac37e2393bdd912a" value="197ebf3b0d7547a1ac37e2393bdd912a" >
</div>
<div class="font_p3">
<a class="btn btn-info" type="button" onclick="showPreDiv(this,1)" style="color:white;"> 上一题 </a>
<a class="btn btn-info" type="button" onclick="showNextDiv(this,3)" style="color:white;"> 下一题 </a>
</div>
</div>
<div style="display: none;" id="mul-11" class="question 82fce817e6d3428789e6a7f390934fcc">
<div class="font_p1" style="border-bottom:solid #81bdeb 1px; padding-bottom:10px;">二、多项选择题(共20小题,每小题2分,共40分)。</div>
<div style="width: 600px;overflow-y: scroll;height: 320px" class="font_p2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="color: #0681DE;">第41题</td>
</tr>
<tr>
<td colspan="2">下列选项中,从海南到北京有什么途径( )。</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="checkbox" name="82fce817e6d3428789e6a7f390934fcc" id="82fce817e6d3428789e6a7f390934fcc-53bcf892051b44e393f2a0c847dbc343" value="53bcf892051b44e393f2a0c847dbc343" onchange="checkBoxClick(this)" class="checkbox magic-checkbox">
<label for="82fce817e6d3428789e6a7f390934fcc-53bcf892051b44e393f2a0c847dbc343"></label>
</td>
<td width="91%" style="display: inline;">
<label>A</label> .
火车</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="checkbox" name="82fce817e6d3428789e6a7f390934fcc" id="82fce817e6d3428789e6a7f390934fcc-be6e288eaa744532ac92e0414f843470" value="be6e288eaa744532ac92e0414f843470" onchange="checkBoxClick(this)" class="checkbox magic-checkbox">
<label for="82fce817e6d3428789e6a7f390934fcc-be6e288eaa744532ac92e0414f843470"></label>
</td>
<td width="91%" style="display: inline;">
<label>B</label> .
汽车</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="checkbox" name="82fce817e6d3428789e6a7f390934fcc" id="82fce817e6d3428789e6a7f390934fcc-69d2063b1be64099a8e5a698b7bf6741" value="69d2063b1be64099a8e5a698b7bf6741" onchange="checkBoxClick(this)" class="checkbox magic-checkbox">
<label for="82fce817e6d3428789e6a7f390934fcc-69d2063b1be64099a8e5a698b7bf6741"></label>
</td>
<td width="91%" style="display: inline;">
<label>C</label> .
飞机</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="checkbox" name="82fce817e6d3428789e6a7f390934fcc" id="82fce817e6d3428789e6a7f390934fcc-75647a7a5ba24e30b828b0688350b2c7" value="75647a7a5ba24e30b828b0688350b2c7" onchange="checkBoxClick(this)" class="checkbox magic-checkbox">
<label for="82fce817e6d3428789e6a7f390934fcc-75647a7a5ba24e30b828b0688350b2c7"></label>
</td>
<td width="91%" style="display: inline;">
<label>D</label> .
走路</td>
</tr>
</table>
</div>
<div class="question_flag">
<input class="magic-checkbox" type="checkbox" name="flag" onchange="giveFlag(this)" id="flag-82fce817e6d3428789e6a7f390934fcc" value="82fce817e6d3428789e6a7f390934fcc">
</div>
<div class="font_p3">
<a class="btn btn-info" type="button" onclick="showPreDiv(this,40)" style="color:white;"> 上一题 </a>
<a class="btn btn-info" type="button" onclick="showNextDiv(this,42)" style="color:white;"> 下一题 </a>
</div>
</div>
<div style="display: none;" id="mul-12" class="question 8e9b45ea403f470dbf3422436f6669dc">
<div class="font_p1" style="border-bottom:solid #81bdeb 1px; padding-bottom:10px;">二、多项选择题(共20小题,每小题2分,共40分)。</div>
<div style="width: 600px;overflow-y: scroll;height: 320px" class="font_p2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="color: #0681DE;">第42题</td>
</tr>
<tr>
<td colspan="2">树立文明形象,主要体现在( )方面。</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="checkbox" name="8e9b45ea403f470dbf3422436f6669dc" id="8e9b45ea403f470dbf3422436f6669dc-7cfc2e86974c4494b714cfa6e12cf892" value="7cfc2e86974c4494b714cfa6e12cf892" onchange="checkBoxClick(this)" class="checkbox magic-checkbox">
<label for="8e9b45ea403f470dbf3422436f6669dc-7cfc2e86974c4494b714cfa6e12cf892"></label>
</td>
<td width="91%" style="display: inline;">
<label>A</label> .
整洁,端庄</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="checkbox" name="8e9b45ea403f470dbf3422436f6669dc" id="8e9b45ea403f470dbf3422436f6669dc-2c17e53fa27d46a09160e318d36b4ba2" value="2c17e53fa27d46a09160e318d36b4ba2" onchange="checkBoxClick(this)" class="checkbox magic-checkbox">
<label for="8e9b45ea403f470dbf3422436f6669dc-2c17e53fa27d46a09160e318d36b4ba2"></label>
</td>
<td width="91%" style="display: inline;">
<label>B</label> .
颜值高</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="checkbox" name="8e9b45ea403f470dbf3422436f6669dc" id="8e9b45ea403f470dbf3422436f6669dc-90130bafde714eb2bfa779db4c28e14c" value="90130bafde714eb2bfa779db4c28e14c" onchange="checkBoxClick(this)" class="checkbox magic-checkbox">
<label for="8e9b45ea403f470dbf3422436f6669dc-90130bafde714eb2bfa779db4c28e14c"></label>
</td>
<td width="91%" style="display: inline;">
<label>C</label> .
诚实可信</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="checkbox" name="8e9b45ea403f470dbf3422436f6669dc" id="8e9b45ea403f470dbf3422436f6669dc-5ecb8ff97d15404a8624443aa9bf1044" value="5ecb8ff97d15404a8624443aa9bf1044" onchange="checkBoxClick(this)" class="checkbox magic-checkbox">
<label for="8e9b45ea403f470dbf3422436f6669dc-5ecb8ff97d15404a8624443aa9bf1044"></label>
</td>
<td width="91%" style="display: inline;">
<label>D</label> .
举止文明</td>
</tr>
</table>
</div>
<div class="question_flag">
<input class="magic-checkbox" type="checkbox" name="flag" onchange="giveFlag(this)" id="flag-8e9b45ea403f470dbf3422436f6669dc" value="8e9b45ea403f470dbf3422436f6669dc">
</div>
<div class="font_p3">
<a class="btn btn-info" type="button" onclick="showPreDiv(this,41)" style="color:white;"> 上一题 </a>
<a class="btn btn-info" type="button" onclick="showNextDiv(this,43)" style="color:white;"> 下一题 </a>
</div>
</div>
<div style="display: none;" id="jud-16" class="question 80629ba10a9c4624b1b42e5bc3e978ce">
<div class="font_p1" style="border-bottom:solid #81bdeb 1px; padding-bottom:10px;">三、判断题。</div>
<div style="width: 600px;overflow-y: scroll;height: 320px" class="font_p2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="color: #0681DE;">第66题</td>
</tr>
<tr>
<td colspan="2"> 你很帅?( )</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="80629ba10a9c4624b1b42e5bc3e978ce" id="80629ba10a9c4624b1b42e5bc3e978ce-04056d42a85e42c4b708ea8c631f2ed1" class="one_answer magic-radio" value="04056d42a85e42c4b708ea8c631f2ed1">
<label for="80629ba10a9c4624b1b42e5bc3e978ce-04056d42a85e42c4b708ea8c631f2ed1"></label>
</td>
<td width="91%">
<label style="display: none;">√</label>正确
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="80629ba10a9c4624b1b42e5bc3e978ce" id="80629ba10a9c4624b1b42e5bc3e978ce-9fdcc0aeadde4bfe8bd10f4e44f5d39c" class="one_answer magic-radio" value="9fdcc0aeadde4bfe8bd10f4e44f5d39c">
<label for="80629ba10a9c4624b1b42e5bc3e978ce-9fdcc0aeadde4bfe8bd10f4e44f5d39c"></label>
</td>
<td width="91%">
<label style="display: none;">×</label>错误
</td>
</tr>
</table>
</div>
<div class="question_flag">
<input class="magic-checkbox" type="checkbox" name="flag" onchange="giveFlag(this)" id="flag-80629ba10a9c4624b1b42e5bc3e978ce" value="80629ba10a9c4624b1b42e5bc3e978ce" class="checkbox">
</div>
<div class="font_p3">
<a class="btn btn-info" type="button" onclick="showPreDiv(this,65)" style="color:white;"> 上一题 </a>
<a class="btn btn-info" type="button" onclick="showNextDiv(this,67)" style="color:white;"> 下一题 </a>
</div>
</div>
<div style="display: none;" id="jud-17" class="question 89396fb35e5844c59ed8a03816207b5f">
<div class="font_p1" style="border-bottom:solid #81bdeb 1px; padding-bottom:10px;">三、判断题。</div>
<div style="width: 600px;overflow-y: scroll;height: 320px" class="font_p2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="color: #0681DE;">第67题</td>
</tr>
<tr>
<td colspan="2">我很帅?。( )</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="89396fb35e5844c59ed8a03816207b5f" id="89396fb35e5844c59ed8a03816207b5f-68017fcbc7124dd280955823ec223635" class="one_answer magic-radio" value="68017fcbc7124dd280955823ec223635">
<label for="89396fb35e5844c59ed8a03816207b5f-68017fcbc7124dd280955823ec223635"></label>
</td>
<td width="91%">
<label style="display: none;">√</label>正确
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="89396fb35e5844c59ed8a03816207b5f" id="89396fb35e5844c59ed8a03816207b5f-9dfdcfdfc9604cb3a89e880cafe788d7" class="one_answer magic-radio" value="9dfdcfdfc9604cb3a89e880cafe788d7">
<label for="89396fb35e5844c59ed8a03816207b5f-9dfdcfdfc9604cb3a89e880cafe788d7"></label>
</td>
<td width="91%">
<label style="display: none;">×</label>错误
</td>
</tr>
</table>
</div>
<div class="question_flag">
<input class="magic-checkbox" type="checkbox" name="flag" onchange="giveFlag(this)" id="flag-89396fb35e5844c59ed8a03816207b5f" value="89396fb35e5844c59ed8a03816207b5f" class="checkbox">
</div>
<div class="font_p3">
<a class="btn btn-info" type="button" onclick="showPreDiv(this,66)" style="color:white;"> 上一题 </a>
<a class="btn btn-info" type="button" onclick="showNextDiv(this,68)" style="color:white;"> 下一题 </a>
</div>
</div>
<div style="display: none;" id="jud-30" class="question fe72301711554ca2bb19b99a7ee00699">
<div class="font_p1" style="border-bottom:solid #81bdeb 1px; padding-bottom:10px;">三、判断题。</div>
<div style="width: 600px;overflow-y: scroll;height: 320px" class="font_p2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="color: #0681DE;">第80题</td>
</tr>
<tr>
<td colspan="2">你是美女吗。( )</td>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="fe72301711554ca2bb19b99a7ee00699" id="fe72301711554ca2bb19b99a7ee00699-1f2d4b5cc6ca474b866e70434c34b04d" class="one_answer magic-radio" value="1f2d4b5cc6ca474b866e70434c34b04d">
<label for="fe72301711554ca2bb19b99a7ee00699-1f2d4b5cc6ca474b866e70434c34b04d"></label>
</td>
<td width="91%">
<label style="display: none;">√</label>正确
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td width="9%" align="center" style="vertical-align:top;padding-top: 5px;padding-left: 10px;">
<input type="radio" name="fe72301711554ca2bb19b99a7ee00699" id="fe72301711554ca2bb19b99a7ee00699-d0c8bb15140042918f9eaf424cfa1a75" class="one_answer magic-radio" value="d0c8bb15140042918f9eaf424cfa1a75">
<label for="fe72301711554ca2bb19b99a7ee00699-d0c8bb15140042918f9eaf424cfa1a75"></label>
</td>
<td width="91%">
<label style="display: none;">×</label>错误
</td>
</tr>
</table>
</div>
<div class="question_flag">
<input class="magic-checkbox" type="checkbox" name="flag" onchange="giveFlag(this)" id="flag-fe72301711554ca2bb19b99a7ee00699" value="fe72301711554ca2bb19b99a7ee00699" class="checkbox">
</div>
<div class="font_p3">
<a class="btn btn-info" type="button" onclick="showPreDiv(this,79)" style="color:white;"> 上一题 </a>
</div>
</div>
</div>
<div class="clearfloat"></div>
</div>
</div>
</body>
</html>
环境python3.5
以下什么模块都行 或者其他模块
BeautifulSoup
Pyquery
HTMLParser SGMLParser
问题1:具体怎么解析这个html所有的问题,比如:
班级有多少个人( )。
A 好多 B 很多 C 不是一般的多 D 超乎想象
你是美女吗。( )
正确 错误
问题2:
解析结果之后,写到数据库,或者写到表格,格式要怎么写才是比较规范的
比如ABCD要不要分开 或者不要ABCD
问题一 解析用BeautifulSoup ,具体用法请查看文档。连接如下
https://www.crummy.com/softwa...
问题二 格式得根据你自己或你公司的要求去做。