Imacros Javascript评估代码无效

时间:2022-11-05 14:30:21

I am trying to extract all the links from a div with imacros and eval javascript but my code is not good what I do wrong ?

我试图用imacros和eval javascript从div中提取所有链接,但我的代码不好我做错了什么?

TAG POS=1 TYPE=div ATTR=dir:ltr Extract=Htm

Set !Var1 Eval("var x = '{{!extract}}';x.match(/href="([^\'\"]+)/g); x[1];") 
PROMpT {{!VAR1}}

1 个解决方案

#1


0  

Try to extract as follows:

尝试提取如下:

TAG POS=1 TYPE=DIV ATTR=dir:ltr EXTRACT=HTM
SET !VAR1 EVAL("'{{!EXTRACT}}'.match(/href=\"(.+?)\"/g).join('\\n').replace(/(href=|\")/g, '');")
PROMPT {{!VAR1}}

#1


0  

Try to extract as follows:

尝试提取如下:

TAG POS=1 TYPE=DIV ATTR=dir:ltr EXTRACT=HTM
SET !VAR1 EVAL("'{{!EXTRACT}}'.match(/href=\"(.+?)\"/g).join('\\n').replace(/(href=|\")/g, '');")
PROMPT {{!VAR1}}