FallingLights / Teachable-dl

Course downloader for teachable platform written in python3 using selenium and yt-dlp
GNU Lesser General Public License v3.0
106 stars 27 forks source link

[BUG] Cannot download course - Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="__next"]/div/div/div[2]/div/div[1]/img"} #36

Closed Antonio112009 closed 7 months ago

Antonio112009 commented 8 months ago

Describe the bug

I've tried with both Ubuntu and macOS and encountered a similar problem:

  1. I run the 'source /...' command and then include the course link with password and email.
  2. the Chrome browser opens automatically.
  3. It goes to the course page.
  4. It logs in with no problems
  5. It gets to the home page dashboard.
  6. It goes to the course page, after which the browser automatically closes with an error in the command line.

Error:


ERROR: Could not download course: https://svit-i-s-school.teachable.com/courses/enrolled/2150650 cause: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="__next"]/div/div/div[2]/div/div[1]/img"}
  (Session info: chrome=120.0.6099.62); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
0   uc_driver                           0x00000001030b6c08 uc_driver + 4852744
1   uc_driver                           0x00000001030ae173 uc_driver + 4817267
2   uc_driver                           0x0000000102c7a7bd uc_driver + 411581
3   uc_driver                           0x0000000102ccae30 uc_driver + 740912
4   uc_driver                           0x0000000102ccafe1 uc_driver + 741345
5   uc_driver                           0x0000000102d16864 uc_driver + 1050724
6   uc_driver                           0x0000000102cf4c2d uc_driver + 912429
7   uc_driver                           0x0000000102d13ae2 uc_driver + 1039074
8   uc_driver                           0x0000000102cf49a3 uc_driver + 911779
9   uc_driver                           0x0000000102cbc103 uc_driver + 680195
10  uc_driver                           0x0000000102cbd71e uc_driver + 685854
11  uc_driver                           0x0000000103076752 uc_driver + 4589394
12  uc_driver                           0x000000010307b95c uc_driver + 4610396
13  uc_driver                           0x000000010305bc71 uc_driver + 4480113
14  uc_driver                           0x000000010307c6d6 uc_driver + 4613846
15  uc_driver                           0x000000010304d1fc uc_driver + 4420092
16  uc_driver                           0x000000010309c758 uc_driver + 4745048
17  uc_driver                           0x000000010309c90e uc_driver + 4745486
18  uc_driver                           0x00000001030addb3 uc_driver + 4816307
19  libsystem_pthread.dylib             0x00007ff80729d202 _pthread_start + 99
20  libsystem_pthread.dylib             0x00007ff807298bab thread_start + 15

Expected behavior I expect the app to download the course)

Screenshots

image

Desktop (please complete the following information):

  1. OS: MacOS 14.1.1
  2. Browser Version: 120.0.6099.62

Additional context Add any other context about the problem here.

FallingLights commented 8 months ago

@Antonio112009 Can you try again with the latest commit if it still fails run with max debug flag and send the output

Antonio112009 commented 8 months ago

@FallingLights Hello. The new version works, however, it still shows the issues from above, BUT after waiting for 2-3 minutes (I suspect your app crawls the course), it downloads the course. Thank you for the quick response!

Antonio112009 commented 8 months ago

P.S. it works both on Mac and Ubuntu