Skip to content

Commit 7e158c8

Browse files
committed
video work
1 parent 3058b30 commit 7e158c8

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

CdaConfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"scriptPublicKey": "",
1717
"packages": ["Http", "DOMParser"],
1818

19-
"allowEval": false,
19+
"allowEval": true,
2020
"allowUrls": [
21-
"www.cda.pl",
22-
"icdn.cda.pl"
21+
"everywhere"
2322
]
2423
}

CdaScript.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,21 @@ source.getContentDetails = function(url) {
7171
return null;
7272
}
7373

74-
const html = domParser.parseFromString(res.body.substring(res.body.indexOf("<body"), res.body.lastIndexOf("</body>") + 7));
74+
log(url);
75+
76+
const html = domParser.parseFromString(res.body);
77+
const playerScript = http.GET("https://www.cda.pl/js/player.js?t=1710798377", {});
78+
if (playerScript.code != 200) {
79+
return null;
80+
}
81+
82+
let window = {
83+
"location":{"href":url,"origin":"https://www.cda.pl","protocol":"https:","host":"www.cda.pl","hostname":"www.cda.pl","port":"","pathname":url.replace("https://www.cda.pl",""),"search":"","hash":""},
84+
"navigator":{},
85+
"document":html
86+
};
87+
88+
eval(playerScript.body);
7589

7690
return new PlatformVideoDetails({
7791
id: new PlatformID(PLATFORM, url.replace(`https://${VIDEO_URL}`, "").replace("/vfilm", ""), config.id),

0 commit comments

Comments
 (0)