podcast-dl 9.3.3 → 9.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/async.js +13 -8
- package/package.json +1 -1
package/bin/async.js
CHANGED
|
@@ -59,14 +59,19 @@ const download = async (options) => {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
let headResponse = null;
|
|
63
|
+
try {
|
|
64
|
+
headResponse = await got(url, {
|
|
65
|
+
timeout: 30000,
|
|
66
|
+
method: "HEAD",
|
|
67
|
+
responseType: "json",
|
|
68
|
+
headers: {
|
|
69
|
+
accept: "*/*",
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
} catch (error) {
|
|
73
|
+
// unable to retrive head response
|
|
74
|
+
}
|
|
70
75
|
|
|
71
76
|
const tempOutputPath = getTempPath(outputPath);
|
|
72
77
|
const removeFile = () => {
|