Battleman / zoomdl

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

Login protected recordings #43

Closed pascal-mueller closed 3 years ago

pascal-mueller commented 3 years ago

Prerequisite

Describe the bug Sometimes a zoom recording is protected by a password but sometimes it also requires you to be authenticated and sometimes you need to be authenticated AND it has a password.

The first case works fine. But the third (and thus probably the second) doesn't work. It seems you can't authenticate using zoomdl.

To Reproduce

Just try to download a video that needs you to be signed in.

Expected behavior I expect a prompt for a login.

URL (opt) I could send you an URL but that's useless since you wouldn't have an account to login.

Logs

zoomdl -u mylink -p 'somepw' -v 0
Using standard Windows UA
Changing page to mylink
Checking CAPTCHA
Using password 'somepw'
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/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 176, in download
UnboundLocalError: local variable 'meet_id' referenced before assignment

Versions (please complete the following information):

Battleman commented 3 years ago

Can you try the procedure I explain here https://github.com/Battleman/zoomdl/issues/41#issuecomment-792263092 ? It should work, although still in beta.

pascal-mueller commented 3 years ago

I can't find a cookie called _zm_kms. There are e.g. _zm_ssid or _zm_page_auth and a bunch of others. And if I try one of the other session cookies with the beta you posted I get

zoomdl: error: unrecognized arguments: -a aw1_c_QwcERoUNSayfgPEV_BfLAA

I downlaoded the tar.gz from the beta and cd'ed into it and just did zoomdl -a 'aw1_c_QwcERoUNSayfgPEV_BfLAA' -p '<pw>' -u <url>

ThereIsNoWindBag commented 3 years ago

It seems Zoom changed the page's syntax. meet_id was changed into meetingId.

So you can edit the code near line 174 in zoomdl.py like this.

... ... ...
... ... ...
# that shit has a password
# first look for the meet_id
self._print("Using password '{}'".format(self.args.password))
meet_id_regex = re.compile("meetingId.*")
for inp in meet_id_regex.findall(self.page.text):
    input_split = inp.split()
    meet_id = input_split[1][1:-2]
    # print(meet_id)
... ... ...
... ... ...

And then you can recompile zoomdl.exe file with wincompile.bat. It worked for me.

Battleman commented 3 years ago

@pascal-mueller I'm pushing this weekend a new version with improved cookies experience (using a cookies.txt file, aligning ZoomDL with what Youtube-DL has been doing). You'll need an extension to your browser, to export the cookies, and input that file to ZoomDL. I'll explain it in the README.

@ThereIsNoWindBag I don't have videos where the tag is called meetingId, it seems to always be meetId. Would you have an example recording to provide? Because it's at login time, there is no need to provide the password

Battleman commented 3 years ago

This should be fixed in 2021.03.27. If this doesn't work, feel free to reopen and let me know. For login-protected videos, login to the video and export your cookies (as explained in the readme

ThereIsNoWindBag commented 3 years ago

@Battleman If you don't mind, Would you give me your e-mail address? I want to give you a sample URL which worked for me, but it is private video so I don't want to show it public.

Battleman commented 3 years ago

Sure! You can send it to zoomdl[at]cloux.dev

ThereIsNoWindBag commented 3 years ago

@Battleman I sended.

Battleman commented 3 years ago

The URL/pwd you sent work fine for me with 2021.03.27 (if you already downloaded it, re-download, there were typos in the code)