Gaarv / kadenze-dl

Small application to download Kadenze (https://www.kadenze.com) videos for courses you enrolled in
MIT License
50 stars 16 forks source link

waiting for selector "text=View all" #25

Closed fguillen closed 2 years ago

fguillen commented 2 years ago

It is not working for me, here is the full log:

> export DEBUG=pw:api && python3 kadenze-dl.py
Signing in www.kadenze.com ...
  pw:api   navigated to "about:blank" +0ms
  pw:api   navigated to "about:blank" +190ms
  pw:api navigating to "https://www.kadenze.com", waiting until "load" +3ms
  pw:api   navigated to "https://www.kadenze.com/" +1s
  pw:api   "domcontentloaded" event fired +2s
  pw:api   "load" event fired +466ms
  pw:api waiting for selector "#email-login-btn" +55ms
  pw:api   selector resolved to visible <a href="javascript:;" id="email-login-btn" class="…>…</a> +528ms
  pw:api attempting click action +40ms
  pw:api   waiting for element to be visible, enabled and stable +0ms
  pw:api   navigated to "https://cdn.iubenda.com/cookie_solution/iframe_bridge.html?origin=https%3A%2F%2Fwww.kadenze.com%2F&meth=%22get%22&c_name=%22_iub_cs-56288926%22" +1ms
  pw:api   navigated to "https://player.vimeo.com/video/112505592?api=1" +22ms
  pw:api   "domcontentloaded" event fired +12ms
  pw:api   element is visible, enabled and stable +43ms
  pw:api   scrolling into view if needed +0ms
  pw:api   done scrolling +14ms
  pw:api   checking that element receives pointer events at (1004.83,270.59) +7ms
  pw:api   element does receive pointer events +3ms
  pw:api   performing click action +0ms
  pw:api   click action done +41ms
  pw:api   waiting for scheduled navigations to finish +0ms
  pw:api   navigated to "https://cdn.iubenda.com/cookie_solution/iframe_bridge.html?origin=https%3A%2F%2Fwww.kadenze.com%2F&meth=%22set%22&c_name=%22_iub_cs-56288926%22&id=56288926&consent=true&timestamp=%222022-02-06T13%3A02%3A48.086Z%22&version=%221.2.4%22" +94ms
  pw:api   navigated to "https://cdn.iubenda.com/cookie_solution/iframe_bridge.html?origin=https%3A%2F%2Fwww.kadenze.com%2F&meth=%22set%22&c_name=%22_iub_cs-56288926%22&id=56288926&consent=true&timestamp=%222022-02-06T13%3A02%3A48.086Z%22&version=%221.2.4%22" +0ms
  pw:api   navigations have finished +1ms
  pw:api   "domcontentloaded" event fired +1ms
  pw:api waiting for selector "input#login_user_email" +1ms
  pw:api   selector resolved to visible <input size="200" pattern=".*" type="email" tabindex="-…/> +9ms
  pw:api elementHandle.fill("HIDDEN") +4ms
  pw:api   waiting for element to be visible, enabled and editable +0ms
  pw:api   element is visible, enabled and editable +25ms
  pw:api waiting for selector "input#login_user_password" +9ms
  pw:api   selector resolved to visible <input size="128" tabindex="-1" maxlength="128" type="p…/> +10ms
  pw:api elementHandle.fill("HIDDEN") +15ms
  pw:api   waiting for element to be visible, enabled and editable +0ms
  pw:api   element is visible, enabled and editable +15ms
  pw:api   "load" event fired +212ms
  pw:api   navigated to "https://vars.hotjar.com/box-acca23410e696f2ca3087d947271c3d0.html" +2s
  pw:api   "domcontentloaded" event fired +2ms
  pw:api   "load" event fired +0ms
  pw:api   "networkidle" event fired +896ms
  pw:api waiting for selector "//*[@id='login_user']/button" +4s
  pw:api   selector resolved to visible <button tabindex="-1" type="submit" data-style="slide-do…>↵Log In↵</button> +11ms
  pw:api attempting click action +5ms
  pw:api   waiting for element to be visible, enabled and stable +0ms
  pw:api   element is visible, enabled and stable +31ms
  pw:api   scrolling into view if needed +1ms
  pw:api   done scrolling +1ms
  pw:api   checking that element receives pointer events at (1004.83,360.1) +2ms
  pw:api   element does receive pointer events +3ms
  pw:api   performing click action +0ms
  pw:api   click action done +61ms
  pw:api   waiting for scheduled navigations to finish +0ms
  pw:api   navigations have finished +1ms
  pw:api navigating to "https://www.kadenze.com/my_courses", waiting until "load" +3s
  pw:api   navigated to "https://www.kadenze.com/sign_in" +371ms
  pw:api   "domcontentloaded" event fired +834ms
  pw:api   "load" event fired +302ms
  pw:api waiting for selector "text=View all" +4ms
  pw:api   navigated to "https://cdn.iubenda.com/cookie_solution/iframe_bridge.html?origin=https%3A%2F%2Fwww.kadenze.com%2Fsign_in&meth=%22set%22&c_name=%22_iub_cs-56288926%22&id=56288926&consent=true&timestamp=%222022-02-06T13%3A02%3A48.086Z%22&version=%221.2.4%22" +590ms
  pw:api   navigated to "https://cdn.iubenda.com/cookie_solution/iframe_bridge.html?origin=https%3A%2F%2Fwww.kadenze.com%2Fsign_in&meth=%22compact%22" +2ms
  pw:api   "domcontentloaded" event fired +170ms
  pw:api   "load" event fired +3ms
  pw:api   "networkidle" event fired +965ms
  pw:api   navigated to "https://vars.hotjar.com/box-acca23410e696f2ca3087d947271c3d0.html" +683ms
  pw:api   "domcontentloaded" event fired +67ms
  pw:api   "load" event fired +2ms
  pw:api   "networkidle" event fired +436ms
Error while listing courses: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for selector "text=View all"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/kadenze_dl/kadenzeclient.py", line 41, in list_courses
    page.click("text=View all")
  File "/usr/local/lib/python3.9/site-packages/playwright/sync_api/_generated.py", line 6362, in click
    self._sync(
  File "/usr/local/lib/python3.9/site-packages/playwright/_impl/_sync_base.py", line 103, in _sync
    return task.result()
  File "/usr/local/lib/python3.9/site-packages/playwright/_impl/_page.py", line 598, in click
    return await self._main_frame.click(**locals_to_params(locals()))
  File "/usr/local/lib/python3.9/site-packages/playwright/_impl/_frame.py", line 374, in click
    await self._channel.send("click", locals_to_params(locals()))
  File "/usr/local/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 36, in send
    return await self.inner_send(method, params, False)
  File "/usr/local/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 47, in inner_send
    result = await callback.future
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for selector "text=View all"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
Selected courses for download: 

I tried with a course name.. and also with "all". Here is my configuration:

kadenze:
    login: "HIDDEN"
    password: "HIDDEN"
download:
    resolution: "720"
    path: "/path/"
    videos_titles: true
    courses:
            - "all"
Gaarv commented 2 years ago

Thanks for notifying this, gonna take a look sometimes this week. Haven't tested if I reproduce the issue yet.

Gaarv commented 2 years ago

I ran tests from multiples IPs and fresh installs and did not have any issue 😕 Are you using email address + password ? It's the only log in method supported from the 3 availables on the website.

Gaarv commented 2 years ago

Since no update and not reproducing the issue, I'm closing this.