我不是一个程序员,但我需要为bot运行这个脚本。有人可以帮我解决一下吗?
VERSION BUILD=9030808 RECORDER=FX
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !VAR1 EVAL("var randomNumber=Math.floor(Math.random()*10 + 1); randomNumber;")
SET !VAR2 EVAL("var randomNumber=Math.floor(Math.random()*60 + 1); randomNumber;")
TAB T=1
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV:nth-of-type(2)>SECTION>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>VIDEO" BUTTON=0
WAIT SECONDS={{!VAR1}}
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV:nth-of-type(2)>SECTION>DIV:nth-of-type(2)>DIV>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(3)>BUTTON" BUTTON=0
WAIT SECONDS={{!VAR1}}
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV:nth-of-type(2)>SECTION>DIV:nth-of-type(2)>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>FORM>INPUT:nth-of-type(4)" BUTTON=0
WAIT SECONDS={{!VAR1}}
TAB T=2
URL GOTO=commments.com
WAIT SECONDS={{!VAR1}}
TAG POS=1 TYPE=H1 ATTR=TXT EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
TAB T=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:comment_sent ATTR=ID:comment CONTENT={{!EXTRACT}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:comment_sent ATTR=*
WAIT SECONDS={{!VAR2}}
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV:nth-of-type(2)>SECTION>DIV:nth-of-type(2)>DIV>DIV:nth-of-type(2)>DIV>DIV>A" BUTTON=0
错误:
Error in line 16 : TAG POS=1 TYPE=H1 ATTR=TXT EXTRACT=TXT
答案 0 :(得分:0)
您收到错误的原因是,该行的属性(ATTR
)部分是错误的。它应该是ATTR=
后跟您要观看的属性,然后是:
,后跟属性的内容。
所以在它之前:
TAG POS=1 TYPE=H1 ATTR=TXT EXTRACT=TXT
修正后应该是:
TAG POS=1 TYPE=H1 ATTR=TXT:* EXTRACT=TXT
注意,我如何使用通配符(*
)来允许HTML标记内的任何类型的内容!
这样做后代码运行正常!如果这可以解决您的问题,请告诉我们!