-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstreamcloud.ts
More file actions
27 lines (22 loc) · 1.04 KB
/
Copy pathstreamcloud.ts
File metadata and controls
27 lines (22 loc) · 1.04 KB
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
var http = new XMLHttpRequest();
http.open("GET", url,false);
http.onloadend = function() {
var temp=http.responseText.split('"');
var id=temp[temp.lastIndexOf("id")+ 2];
var PostData = function ( id, url,doOnComplete){
var http = new XMLHttpRequest();
var data = new FormData();
http.open("POST", url, true);
data.append('op', 'download2');
data.append('id', id);
data.append('imhuman', 'Weiter zum Video');
http.onloadend = function() {
var temp=http.responseText.split('"');
var link=temp.find(x => x.endsWith("video.mp4"));
doOnComplete(link);
}
http.send(data);
}
PostData(id,url,doOnComplete);
}
http.send();