-
Notifications
You must be signed in to change notification settings - Fork 0
/
th_thm.js
46 lines (34 loc) · 991 Bytes
/
th_thm.js
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
//泰国AIS
const mobile = require("./common/mobile");
const util = require("./common/util");
(async () => {
const info = util.info();
const m = await mobile.start({
headless: false,
devtools: true,
ignoreHTTPSErrors: true,
env: {
TZ: info.timezone,
...process.env
},
args: ["--incognito", `--proxy-server=${info.proxy}`, `--lang=${info.lang}`]
});
try {
await m.get(`http://fa.allcpx.com/30007?aid=${info.deviceid}&cid={clickid}`, {
timeout: 60 * 1000
});
await m.sleep(1 * 1000);
util.saveFile(
`./pages/th/thm/${info.deviceid}/1.html`,
await m._page.content()
);
//第一次点击
await m.tapElement("#good");
await m.sleep(1 * 1000);
util.saveFile(`./pages/th/thm/${info.deviceid}/2.html`)
} catch (e) {
console.log(e);
} finally {
m.close();
}
})();