简体   繁体   中英

Imacros Javascript eval code not working

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 ?

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM