csyezheng / edx-helper

A command line tool for downloading courses from edx.org.
GNU Lesser General Public License v3.0
34 stars 13 forks source link

Fails to Download Subtitles #3

Closed whistooy closed 11 months ago

whistooy commented 11 months ago

🚨Please review the Troubleshooting section before reporting any issue. Don't forget also to check the current issues to avoid duplicates.

Subject of the issue

edx-helper fails to download subtitles with --with-subtitles option

Description of the issue

I tried to download videos and subtitles from an edX course using edx-helper, but it only downloaded the videos and not the subtitles, even though I used the --with-subtitles option. I checked the output folder and there were no .srt files.

Your environment

Steps to reproduce

  1. Run the following command: edx-helper -u <email> --with-subtitles https://learning.edx.org/course/course-v1:MITx+6.86x+3T2023/home
  2. Wait for the download to finish.
  3. Check the output folder for .srt files.

Expected behaviour

The output folder should contain .srt files for each video.

Actual behaviour

The output folder contains no .srt files despite using the --with-subtitles option.

csyezheng commented 11 months ago

@whistooy

This bug has been fixed in version 0.6.4. Please upgrade edx-helper by running:

python -m pip install --upgrade --index-url https://pypi.org/simple/ edx-helper

Make sure you upgrade to the correct version by running:

edx-helper --version
whistooy commented 11 months ago

Thank you for your response and for fixing the bug in version 0.6.4. However, I'm afraid the problem still persists for me. I upgraded edx-helper and verified the version, but I still don't get any subtitles when I use the --with-subtitles option. I checked the output folder and there were only .mp4, .html and other files, but no .srt, .vtt or any subtitle files.

I wonder if this issue is related to the course. I'm trying to download videos and subtitles from this course: https://learning.edx.org/course/course-v1:MITx+6.86x+3T2023/home. However, I didn't have any trouble downloading subtitles in .vtt files from another course: https://learning.edx.org/course/course-v1:HarvardX+CS50AI+1T2020/home using the --with-subtitles option.

$ edx-helper --version
0.6.4
csyezheng commented 11 months ago

@whistooy

Sorry, I cannot reproduce this issue. I have enrolled in the course: https://learning.edx.org/course/course-v1:MITx+6.86x+3T2023/home, but I can't access this course, because the course hasn't started yet. The course is shown to start on May 27, 2024.

So, I can only test this issue on other courses. I can download .srt subtitles from this class normally: https://learning.edx.org/course/course-v1:HarvardX+CS50AI+1T2020/home.

I'm sorry that I can't solve this issue at the moment.

whistooy commented 11 months ago

@whistooy

Sorry, I cannot reproduce this issue. I have enrolled in the course: https://learning.edx.org/course/course-v1:MITx+6.86x+3T2023/home, but I can't access this course, because the course hasn't started yet. The course is shown to start on May 27, 2024.

So, I can only test this issue on other courses. I can download .srt subtitles from this class normally: https://learning.edx.org/course/course-v1:HarvardX+CS50AI+1T2020/home.

I'm sorry that I can't solve this issue at the moment.

Thank you for your reply and for trying to reproduce the issue. I have found another course that has the same problem. Here is the link: https://learning.edx.org/course/course-v1:RaspberryPiFoundation+ML-AI+1T2023/home

This course is open for enrollment now. I enrolled in this course and tried to download the videos and subtitles using edx-helper, but I only got the videos and not the subtitles. I used the same command and environment as before.

csyezheng commented 11 months ago

@whistooy

I'm pretty sure that subtitle files can be downloaded in this course: https://learning.edx.org/course/course-v1:RaspberryPiFoundation+ML-AI+1T2023/home

edx-helper -u csyezheng@gmail.com --with-subtitles -o D:/courses/ https://learning.edx.org/course/course-v1:RaspberryPiFoundation+ML-AI+1T2023/home

subtitles

whistooy commented 11 months ago

I did some tests on my Windows 10 machine.

I followed the instructions in the “Manual Installation” section, but after installing edx-helper in either way, I could not download any subtitles. However, when I followed the “Installation (recommended)” section, I was able to download subtitles without any problem.

I usually use Arch Linux, which does not manage packages in pip, so I followed the “Manual Installation” section and installed its requirements manually, but this method did not work even on Windows.

image

csyezheng commented 11 months ago

Then I don't know why :)

Installation method should not make a difference in results.

Another option is to git clone the repository without installation, and then run it directly with python.

I also use archlinux. I usually use miniconda to create a virtual environment and then use pip to install the package.

whistooy commented 11 months ago

I created a python virtual environment. Then I used pip to install edx-helper and ran the command. It worked! I was able to download the videos and subtitles from the course. Thank you so much for your help and patience!