如何使用cheerio提取文本,从一个tr和两个childerns创建两行

问题描述

我需要帮助:

我尝试使用cheerio从HTML中提取文本

有tr,tr中有两个a元素

<tr>
    <input type="hidden" name="DATE_48" value="GS 1">
    <td align="left" bgcolor="#e3e3e3" height="20">&nbsp;GS 1&nbsp;</td>
    <td align="left" bgcolor="#e3e3e3" height="20">&nbsp;TS 02&nbsp;</td>
    <td align="left" bgcolor="#e3e3e3" height="20">
    &nbsp;DE Text
    <br>&nbsp;En Text&nbsp;</td>
    <td align="left" bgcolor="#e3e3e3" height="20">&nbsp;
    <a href="javascript:waitForDoc('JDE','1');"><font color="0x0000E0">DE</font></a><br>&nbsp;
    <a href="javascript:waitForDoc('JEN','2-1');"><font color="0x0000E0">EN</font></a>&nbsp;</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">&nbsp;G1&nbsp;</td>
</tr>

如何将数据提取为两行,例如:

GS 1,TS 02,DE Text,DE; G1
GS 1,EN Text,EN; G1

tnx

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)