问题描述
我需要帮助:
我尝试使用cheerio从HTML中提取文本
有tr,tr中有两个a元素
<tr>
<input type="hidden" name="DATE_48" value="GS 1">
<td align="left" bgcolor="#e3e3e3" height="20"> GS 1 </td>
<td align="left" bgcolor="#e3e3e3" height="20"> TS 02 </td>
<td align="left" bgcolor="#e3e3e3" height="20">
DE Text
<br> En Text </td>
<td align="left" bgcolor="#e3e3e3" height="20">
<a href="javascript:waitForDoc('JDE','1');"><font color="0x0000E0">DE</font></a><br>
<a href="javascript:waitForDoc('JEN','2-1');"><font color="0x0000E0">EN</font></a> </td>
<td align="center" bgcolor="#e3e3e3" height="20"><img name="STATUSCOLOR_48" height="16" width="16"
border="0" src="green.gif">
</td>
<td align="left" bgcolor="#e3e3e3" height="20"> G1 </td>
</tr>
如何将数据提取为两行,例如:
GS 1,TS 02,DE Text,DE; G1
GS 1,EN Text,EN; G1
tnx
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)