iMacros如何在不具有元素属性的情况下提取数据?
问题描述:
我想提取数据:姓名,电子邮件,电话,日期,城市
这里的HTML代码示例:iMacros如何在不具有元素属性的情况下提取数据?
<tbody>
<tr class="grid-row">
<td>Jimmy Shark</td>
<td>[email protected]</td>
<td>082166883333</td>
<td>07/13/15, 07:23 AM</td>
<td></td>
</tr>
<tr class="odd grid-row">
<td>Denny Large</td>
<td>[email protected]</td>
<td>08575510121</td>
<td>07/09/16, 11:55 PM</td>
<td></td>
</tr>
<more and repeated>
</tbody>
答
开始与下面的宏和纠正,以满足您的目标:
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
SET !EXTRACT_TEST_POPUP NO
TAG XPATH="//tr[@class='grid-row'][{{!LOOP}}]/td[1]" EXTRACT=TXT
TAG XPATH="//tr[@class='grid-row'][{{!LOOP}}]/td[2]" EXTRACT=TXT
TAG XPATH="//tr[@class='grid-row'][{{!LOOP}}]/td[3]" EXTRACT=TXT
TAG XPATH="//tr[@class='grid-row'][{{!LOOP}}]/td[4]" EXTRACT=TXT
TAG XPATH="//tr[@class='grid-row'][{{!LOOP}}]/td[5]" EXTRACT=TXT
PROMPT {{!EXTRACT}}
SET !EXTRACT NULL
TAG XPATH="//tr[@class='odd grid-row'][{{!LOOP}}]/td[1]" EXTRACT=TXT
TAG XPATH="//tr[@class='odd grid-row'][{{!LOOP}}]/td[2]" EXTRACT=TXT
TAG XPATH="//tr[@class='odd grid-row'][{{!LOOP}}]/td[3]" EXTRACT=TXT
TAG XPATH="//tr[@class='odd grid-row'][{{!LOOP}}]/td[4]" EXTRACT=TXT
TAG XPATH="//tr[@class='odd grid-row'][{{!LOOP}}]/td[5]" EXTRACT=TXT
PROMPT {{!EXTRACT}}
oke work Shugar和我完成它保存在CSV文件..问题如何这个宏可以运行旁边的页面和更多的页面,像这样的链接 http://member.googlee.net/afleads?_al_p = 0 http://member.googlee.net/afleads?_al_p=1 http://member.googlee.net/afleads?_al_p=2 http://member.googlee.net/afleads?_a l_p = ....接下来的下一个直到完成或可以设置,直到33页...如果宏变成javasript oke没问题..谢谢Shugar –
你可以从我的答案[这里](http:// *。 com/questions/38422883/regular-imacros-transform-into-javascript-but-still-not-work)。 – Shugar