soraxas / echo360

Commandline tool for automated downloads of echo360 videos hosted by university
https://cs.tinyiu.com/echo360
MIT License
281 stars 53 forks source link

Unable to download for Canadian Echo360 #60

Closed TetradoToxinTTX closed 2 years ago

TetradoToxinTTX commented 2 years ago

Canada Echo360 doesn't have a .org or a .net. I already have ffmpeg installed and verified that it was working.

I've tried using auto-downloaded chrome/firefox/phantomjs and I've even tried using the updated chromedriver. I've tried changing the .ca to .org.ca and it still doesn't work.

The login window was finally able to open when I ran it with .org with the updated chromedriver.

.\echo360-windows.exe https://echo360.org/section/0dffe11b-3cbe-45e0-b66a-b0766e3cd264/home --chrome
> Echo360 Cloud platform detected
> This implies setup_credential, and using web_driver
>> Please login with your SSO details and type continue when logged in.
-----------------------------------------------------------------

DevTools listening on ws://127.0.0.1:58991/devtools/browser/fa06fa87-ecab-4071-b79e-cabca7ddaa5c
 >> After you finished logging in, type 'continue' in the terminal.
> Type 'continue' and press [enter]
[5780:21460:0413/221317.270:ERROR:device_event_log_impl.cc(214)] [22:13:17.270] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[5780:21460:0413/221317.278:ERROR:device_event_log_impl.cc(214)] [22:13:17.278] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[5780:14140:0413/221404.231:ERROR:util.cc(126)] Can't create base directory: C:\Program Files\Google\GoogleUpdater
continue
>> I'm gonna assume you are responsible enough to had finished logged in by now ;)
>> Retrieving echo360 Course Info... Traceback (most recent call last):
  File "entrypoint.py", line 7, in <module>
  File "echo360\main.py", line 365, in main
  File "echo360\downloader.py", line 202, in download_all
  File "echo360\course.py", line 139, in get_videos
  File "echo360\course.py", line 216, in _get_course_data
  File "json\__init__.py", line 348, in loads
  File "json\decoder.py", line 337, in decode
  File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
[15864] Failed to execute script entrypoint

Sadly, it still didn't download in the end. Here's the error when I run it through the updated chromedriver using .org instead of .ca: echo360Downloader1.log

All the dependencies are installed and I'm running Python 3.10.4 on my Window 10 computer.

Here's what happens if I just run it with .ca as it is supposed to:

.\echo360-windows.exe https://echo360.ca/section/0dffe11b-3cbe-45e0-b66a-b0766e3cd264/home --chrome

DevTools listening on ws://127.0.0.1:60330/devtools/browser/2069cc93-a0e4-45c9-98f2-b2e046c0ed3c
>> Logging into "https://echo360.ca/ess/portal/section/home"... INFO: No need to login :)
Done!
>> Retrieving echo360 Course Info... selenium cannot find given elements
Exception: Message: no such element: Unable to locate element: {"method":"css selector","selector":"pre"}
  (Session info: headless chrome=100.0.4896.88)
Stacktrace:
Backtrace:
        Ordinal0 [0x00C87413+2389011]
        Ordinal0 [0x00C19F61+1941345]
        Ordinal0 [0x00B0C658+837208]
        Ordinal0 [0x00B391DD+1020381]
        Ordinal0 [0x00B3949B+1021083]
        Ordinal0 [0x00B66032+1204274]
        Ordinal0 [0x00B54194+1130900]
        Ordinal0 [0x00B64302+1196802]
        Ordinal0 [0x00B53F66+1130342]
        Ordinal0 [0x00B2E546+976198]
        Ordinal0 [0x00B2F456+980054]
        GetHandleVerifier [0x00E39632+1727522]
        GetHandleVerifier [0x00EEBA4D+2457661]
        GetHandleVerifier [0x00D1EB81+569713]
        GetHandleVerifier [0x00D1DD76+566118]
        Ordinal0 [0x00C20B2B+1968939]
        Ordinal0 [0x00C25988+1989000]
        Ordinal0 [0x00C25A75+1989237]
        Ordinal0 [0x00C2ECB1+2026673]
        BaseThreadInitThunk [0x7676FA29+25]
        RtlGetAppContainerNamedObjectPath [0x77257A7E+286]
        RtlGetAppContainerNamedObjectPath [0x77257A4E+238]

echo360Downloader2.log

soraxas commented 2 years ago

For the issue with .org, .net:

See if if works with your original URL (that ends with .ca)

TetradoToxinTTX commented 2 years ago

Yes! This works but I had to update the Chrome driver instead of using the auto-downloaded one.

Thank you for this!