coletdjnz / yt-dlp-youtube-oauth2

[OBSOLETE] Plugin that adds OAuth2 login support to yt-dlp's YouTube extractors
The Unlicense
259 stars 38 forks source link

--password option requires 1 argument' #46

Closed rubiksw closed 1 month ago

rubiksw commented 1 month ago

I can run this from the terminal just fine. When trying to execute it from a .ts file I get the following error. If I put the password in quotations I am prompted to login to confirm I'm not a bot. Again, works fine directly from terminal to bypass the login.

1|Media Converter Dev | escapedCommand: '"/home/xxx/yt-dlp" "https://www.youtube.com/watch?v=KNtJGQkC-WI" -x --audio-format mp3 --audio-quality 5 -o "dev_audio/e2b41986e8b5fddd4b935c88081d373a0999b28d1c4aaf481b.%(ext)s" --username oauth2 --password', 1|Media Converter Dev | exitCode: 2, 1|Media Converter Dev | signal: undefined, 1|Media Converter Dev | signalDescription: undefined, 1|Media Converter Dev | stdout: '', 1|Media Converter Dev | stderr: '\n' + 1|Media Converter Dev | 'Usage: yt-dlp [OPTIONS] URL [URL...]\n' + 1|Media Converter Dev | '\n' + 1|Media Converter Dev | 'yt-dlp: error: --password option requires 1 argument', 1|Media Converter Dev | failed: true, 1|Media Converter Dev | timedOut: false, 1|Media Converter Dev | isCanceled: false, 1|Media Converter Dev | killed: false 1|Media Converter Dev | } 1|Media Converter Dev | [ERROR] https://www.youtube.com/watch?v=KNtJGQkC-WI Issue downloading audio

coletdjnz commented 1 month ago

You need to pass an empty string to --password

rubiksw commented 1 month ago

I think this has something to do with how the command is escaped. I was passing ' ' and " ". I decided to go with using a netrc file instead.

rubiksw commented 1 month ago

Going to mark as closed since this is more than likely an issue with how the command is parsed in typescript and not the plugin itself.