Open teadrinker2015 opened 7 months ago
Can you try surrounding the arguments with double quotes? e.g.,
chat_downloader "https://www.youtube.com/watch?v=-ZLltnPt5WM" -o "-ZLltnPt5WM.json" -q
Forgot to mention, I'm using powershell. Neither single nor double quotes work. Only single quotes on windows command-line shell worked as expected.
PSVersionTable
Name Value
---- -----
PSVersion 7.3.10
PSEdition Core
GitCommitId 7.3.10
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
In that case, can you try:
' -ZLltnPt5WM.json'
\
?In that case, can you try:
- appending a space to the beginning of the video id:
' -ZLltnPt5WM.json'
Adding space will result in a space in actual filename, but bypass this problem successfully. My version of Windows dosen't trim leading space in filenames perhaps.
- escape the dash (I'm not sure how, perhaps
\
?
After test, '`-ZLltnPt5WM.json'
will also result in a leading `
, And other pattern "`-ZLltnPt5WM.json"
will fail.
I think we're hitting a limitation in argparse... The best approach is probably to use one of the following alternatives instead:
--output=-ZLltnPt5WM.json
-o=-ZLltnPt5WM-2.json
Basic information
Describe the bug
Filename string after --output cannot begin with dash(-) due to mis-interpretated as option.
Command/Code used
If running from the command line, provide the following:
-v
):Expected behavior
silently exits (success)
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context/information
Add any other context or information about the problem here.