-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
45 lines (40 loc) · 1.58 KB
/
test.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
var url = encodeURI('http://seasonvar.ru/serial-4923-hakKorni.html');
var page = require('webpage').create();
page.onInitialized = function ()
{
page.evaluate(function ()
{
window.navigator = {
plugins: {length: 2, 'Shockwave Flash': {name: 'Shockwave Flash', description: 'Shockwave Flash 11.6 r602'}},
mimeTypes: {length: 2, "application/x-shockwave-flash":
{description: "Shockwave Flash", suffixes: "swf", type: "application/x-shockwave-flash", enabledPlugin: {description: "Shockwave Flash 11.6 r602"}}
},
appCodeName: "Mozilla",
appName: "Netscape",
appVersion: "5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22",
cookieEnabled: true,
language: "en",
onLine: true,
platform: "CentOS 5.7",
product: "Gecko",
productSub: "20030107",
userAgent: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22",
};
});
};
page.open(url, function(status) {
var result;
if (status !== 'success')
{
console.log('Error: Unable to access network!');
}
else
{
result = page.evaluate(function ()
{
return document.getElementById("videoplayer719").parentNode.innerHTML;
});
console.log(result);
}
phantom.exit();
});