Skip to content

Commit 486c3a1

Browse files
committed
vimeo passwords are ready
1 parent 85a6726 commit 486c3a1

File tree

4 files changed

+673
-23
lines changed

4 files changed

+673
-23
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,16 @@ const server = expressApp.listen(0, () => {
174174

175175
expressApp.get('/get_vid_options', (req, res) => {
176176
const videoUrl = req.query.url;
177+
const vimeoPass = req.query.vimeoPass;
178+
177179
if (!videoUrl) return res.status(400).send('Missing "url" parameter');
178180

179-
const cookiePart = videoUrl.includes("youtube.com")
181+
let cookiePart = videoUrl.includes("youtube.com")
180182
? ` --cookies "${path.join(userDataDir, 'yt-cookie.txt')}"`
181183
: '';
184+
cookiePart = vimeoPass
185+
? ` --video-password "${vimeoPass}"`
186+
: '';
182187
const command = `"${path.join(executablesDir, 'yt-dlp-mac')}"${cookiePart} -F "${videoUrl}"`;
183188

184189
exec(command, { encoding: 'utf8', maxBuffer: 1024 * 1024 }, (error, stdout) => {

0 commit comments

Comments
 (0)