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] In case lecture title is too long the download will fail #16

Closed reggian closed 1 year ago

reggian commented 1 year ago

Describe the bug On some systems (e.g. macOS) there is a limit to how long a file name can be. In case a lecture name is very long it can exceed this limit and the download of that lecture will fail.

To Reproduce Steps to reproduce the behavior:

  1. have a lecture with very long title (on macOS the file name limit is 255 chars)
  2. download ...

Expected behavior The download should trim the length of the lecture title in order to fit within the file name length limit.

Desktop (please complete the following information):

Additional context On macOS the file name limit is 255 characters. There is no limit for the lecture title on Teachable platform. Thus it can happen that the lecture is not downloaded due to the lecture title just being too long.

reggian commented 1 year ago

I have solved this issue in my case for macOS by adding title truncation. You can check out my solution on my fork. Please let me know if the solution fits into the vision of this project and if I should create a PR.

reggian commented 1 year ago

Great! I see you pulled it already #18.