Battleman / zoomdl

Download Zoom recorded meetings easily
GNU General Public License v3.0
341 stars 44 forks source link

-f option does not work on windows 10 #35

Closed jovajiv closed 3 years ago

jovajiv commented 3 years ago

Prerequisite

Describe the bug

I've tried to use the -f option to rename the output file so that it would not overwrite the previous download. it does not work.

To Reproduce

  1. Go to 'zoomdl.exe -u url-f filename'
  2. output is always the default output

Expected behavior

CMD OUTPUT : C:\Users\jovaj\Downloads\zoom>zoomdl.exe -u https://us02web.zoom.us/rec/play/NNgbNCNR6FyNJL649qhRAKqRrLP_A7skzFl0b-P2duxpOXFaUza9XM9BR6EkREvI-R4HbHKl4Fac-zju.cPzNcQovOhFcaE9F?startTime=1605103851000&_x_zm_rtaid=xiTTcvpVT7OfuUf1YDLjyg.1608486501273.f8995b640a3c38dea7752a1edd446d57&_x_zm_rhtaid=682 -f file Downloading 'C:\Users\jovaj\Downloads\zoom\יסודות_בגנומיקהחישובית-_שעור.mp4'...

Screenshots

URL (opt)

https://...

Logs

<LOGS>

Versions (please complete the following information):

Additional context (opt) Add any other context about the problem here.

metal450 commented 3 years ago

Doesn't only apply to Windows - the issue is the same on Linux. Neither -f nor -fname seem to do anything.

(This makes it impossible to download some vidoes that have invalid characters in their filenames - those files fail to save, and cannot be given a name specification to avoid the issue).

Battleman commented 3 years ago

That's interesting. I can't seem to reproduce the problem. Works for me on Windows 10 and on Debian 10, both python 3.7.6. Can you launch the command with max verbosity (-v 0) and report the output (as well as your python version, with python -V) ?

metal450 commented 3 years ago

python -V is 2.7.18 python3 -V is 3.8.5

If I run zoomdl on an ntfs partition from Linux (aka where colons aren't supported in filenames, but without -f, just only specifying url), it errors out:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/bin/zoomdl/__main__.py", line 20, in <module>
  File "/usr/bin/zoomdl/zoom_dl/__init__.py", line 18, in main
  File "/usr/bin/zoomdl/zoom_dl/zoomdl.py", line 192, in download
  File "/usr/bin/zoomdl/zoom_dl/zoomdl.py", line 121, in download_vid
OSError: [Errno 22] Invalid argument: '/media/metal450/SSD-Data/Cloud/Desktop/NoSync/zoomdl/Day_1:_Investing_w_Stock_Options.mp4'

If I do it on a Linux partition, it works (but per this issue, ignores the output filename). Here's the output o running with -f and -v 0 on a btrfs partition:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/bin/zoomdl/__main__.py", line 20, in <module>
  File "/usr/bin/zoomdl/zoom_dl/__init__.py", line 18, in main
  File "/usr/bin/zoomdl/zoom_dl/zoomdl.py", line 192, in download
  File "/usr/bin/zoomdl/zoom_dl/zoomdl.py", line 113, in download_vid
  File "/usr/bin/zoomdl/zoom_dl/zoomdl.py", line 241, in get_filepath
FileNotFoundError: [Errno 2] No such file or directory
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 76, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwd(), sys.argv[0]))
FileNotFoundError: [Errno 2] No such file or directory

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/bin/zoomdl/__main__.py", line 20, in <module>
  File "/usr/bin/zoomdl/zoom_dl/__init__.py", line 18, in main
  File "/usr/bin/zoomdl/zoom_dl/zoomdl.py", line 192, in download
  File "/usr/bin/zoomdl/zoom_dl/zoomdl.py", line 113, in download_vid
  File "/usr/bin/zoomdl/zoom_dl/zoomdl.py", line 241, in get_filepath
FileNotFoundError: [Errno 2] No such file or directory
Battleman commented 3 years ago

Yesterday I pushed yesterday and just released v20210101, that fixes the issue of colons (as per #36). Hopefully this fixes the first problem. As I use Windows in a VM on Linux, the issues with NTFS don't appear to me. As per the issue on Linux, I'm not sure? It seems os.getcwd() throws the error, line 241. I find no report of getcwd not playing nice with btrfs. What is the exact command you launch?

Battleman commented 3 years ago

@jovajiv for your problem, my guess is that you didn't put quotes around the url (see this). Thus when you type

zoomdl.exe -u https://us02web.zoom.us/rec/play/NNgbNCNR6FyNJL649qhRAKqRrLP_A7skzFl0b-P2duxpOXFaUza9XM9BR6EkREvI-R4HbHKl4Fac-zju.cPzNcQovOhFcaE9F?startTime=1605103851000&_x_zm_rtaid=xiTTcvpVT7OfuUf1YDLjyg.1608486501273.f8995b640a3c38dea7752a1edd446d57&_x_zm_rhtaid=682 -f myfile

The terminal (cmd, powershell, bash...) sees this

https://us02web.zoom.us/rec/play/NNgbNCNR6FyNJL649qhRAKqRrLP_A7skzFl0b-P2duxpOXFaUza9XM9BR6EkREvI-R4HbHKl4Fac-zju.cPzNcQovOhFcaE9F?startTime=1605103851000
&
_x_zm_rtaid=xiTTcvpVT7OfuUf1YDLjyg.1608486501273.f8995b640a3c38dea7752a1edd446d57
&
_x_zm_rhtaid=682 -f myfile

and tries to do 3 commands. Hence, the -f isn't attached to the original command, and zoomdl doesn't see this.

metal450 commented 3 years ago

Yesterday I pushed yesterday and just released v20210101, that fixes the issue of colons (as per #36). Hopefully this fixes the first problem.

Nope - still happens w/ current master.

As per the issue on Linux ... What is the exact command you launch?

It's a semi-private zoom link so I can't share the actual url, but just zoomld -u "the_url" -f file.mp4

Battleman commented 3 years ago

I don't see anything that would fail it. All my tests show it should work. It looks like the recording doesn't have a name at all? If still available, could you share a link that fails at zoomdl[at]cloux.dev ? Truly 0 interest in the content of the recording, but if I can reproduce it I can debug it, otherwise it's kinda hard.

metal450 commented 3 years ago

Thanks for the reply. Totally fair enough - unfortunately I just can't (I actually have a signed NDA about the contents of the meeting, so if I were to send it anywhere, I could theoretically get in trouble). In any case, I was able to get it downloaded by just doing so to a non-ntfs partition, so I guess it's fine for now, & I can report back in the event that I can reproduce it again on a sharable link. Thanks again for trying, tho :)

jacobrosenfeld commented 3 years ago

I think I found that you need the quotes around the filename argument as well so -u "zoom.us/qwerty" -f "filename123" That's how I enter the arguments on my Macbook Pro and it works great!

Battleman commented 3 years ago

No news about that, so it can't be reproduced for how. Closing until/if a reproducible case arises.