We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 744d61f commit 2521dabCopy full SHA for 2521dab
script.js
@@ -11,12 +11,17 @@ function downloadVideo() {
11
12
messageEl.textContent = "Downloading...";
13
14
- fetch('https://144.126.140.60:3000/download?url=' + encodeURIComponent(url))
15
- .then (response => response.text())
16
- .then (data => {
+ fetch('http://s1.phntmhosting.xyz:6909/download?url=' + encodeURIComponent(url))
+ .then(response => {
+ if (!response.ok) {
17
+ throw new Error('Network response was not ok: ' + response.statusText);
18
+ }
19
+ return response.text();
20
+ })
21
+ .then(data => {
22
messageEl.textContent = data;
23
24
+ .catch(error => {
25
+ messageEl.textContent = "Error: " + error.message;
26
});
27
}
-
0 commit comments