forked from andeya/pholcus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.pholcus.html
68 lines (68 loc) · 2.07 KB
/
test.pholcus.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<Spider>
<Name>HTML动态规则-乐蛙登录测试</Name>
<Description>(HTML动态规则示例) 乐蛙登录测试 [Auto Page] [http://accounts.lewaos.com]</Description>
<Pausetime>300</Pausetime>
<EnableLimit>false</EnableLimit>
<EnableCookie>true</EnableCookie>
<EnableKeyin>false</EnableKeyin>
<NotDefaultField>false</NotDefaultField>
<Namespace>
<Script></Script>
</Namespace>
<SubNamespace>
<Script></Script>
</SubNamespace>
<Root>
<Script param="ctx">
console.log("Root");
ctx.JsAddQueue({
Url: "http://accounts.lewaos.com/",
Rule: "登录页"
});
</Script>
</Root>
<Rule name="登录页">
<AidFunc>
<Script param="ctx,aid">
</Script>
</AidFunc>
<ParseFunc>
<Script param="ctx">
console.log(ctx.GetRuleName());
ctx.JsAddQueue({
Url: "http://accounts.lewaos.com",
Rule: "登录后",
Method: "POST",
PostData: "[email protected]&password=44444444&login_btn=login_btn&submit=login_btn",
});
</Script>
</ParseFunc>
</Rule>
<Rule name="登录后">
<ParseFunc>
<Script param="ctx">
console.log(ctx.GetRuleName());
ctx.Output({
"全部": ctx.GetText()
});
ctx.JsAddQueue({
Url: "http://accounts.lewaos.com/member",
Rule: "个人中心",
Header: {
"Referer": [ctx.GetUrl()]
}
});
</Script>
</ParseFunc>
</Rule>
<Rule name="个人中心">
<ParseFunc>
<Script param="ctx">
console.log("个人中心: " + ctx.GetRuleName());
ctx.Output({
"全部": ctx.GetText()
});
</Script>
</ParseFunc>
</Rule>
</Spider>