Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
435 views
in Technique[技术] by (71.8m points)

How to extract text with cheerio, from one tr and two a childerns create two rows

I neet help:

I try with cheerio extract text from HTML

There is tr, in tr are two a elements

<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>

How can i extect data into two rows like:

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

tnx

question from:https://stackoverflow.com/questions/65933076/how-to-extract-text-with-cheerio-from-one-tr-and-two-a-childerns-create-two-row

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...