如何提取文本,不提取所有文本?

问题描述 投票:0回答:1

如何仅复制文本TEST DRIVING 1?

示例源HTML:

<div class="descr">
    <div class="marg5px" style="outline: 1px solid blue;">
    <a href="http://TEST-HTML.COM" title="TEST DRIVING 1">TEST DRIVING 1</a>
    <br>
    Grab all the stars and avoid spikes as you grab keys and activate your shield.
    <br>
    </div>
</div>

我的iMacros代码:

TAG POS=1 TYPE=DIV ATTR=CLASS:marg5px EXTRACT=TXT
 SET !CLIPBOARD {{!EXTRACT}}

此代码有效,但结果显示不需要的文本

enter image description here

我想要的结果是,只有“TEST DRIVING 1”字样,如下图所示:

enter image description here

请给我建议代码来解决这个问题。

html imacros
1个回答
0
投票

试试这个,抱歉迟到了

TAG POS = 1 TYPE = DIV ATTR = CLASS:MARG5px TAG POS = 1 TYPE = A ATTR = TITLE * EXTRACT = TXT

© www.soinside.com 2019 - 2024. All rights reserved.