coursera-dl / edx-dl

A simple tool to download video lectures from edx.org (and other openedx sites)
GNU Lesser General Public License v3.0
1.92k stars 638 forks source link

Fixed it to a working version #687

Closed csyezheng closed 8 months ago

csyezheng commented 9 months ago

🚨Please review the guidelines for contributing to this repository.

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, please explain why you chose the solution you did and what alternatives you considered, etc.

Reviewers

If you know the person who can review your code please add a @mention.

FrankWorldview commented 9 months ago

Thank you for providing the new version. But I got the following error (on Python 3.11.5):

Output directory: Downloaded Traceback (most recent call last): File "D:\edx-dl\edx-dl.py", line 8, in edx_dl.main() File "D:\edx-dl\edx_dl\edx_dl.py", line 1261, in main download(args, selections, all_units, headers) File "D:\edx-dl\edx_dl\edx_dl.py", line 993, in download course_name = directory_name(selected_course.name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\edx-dl\edx_dl\utils.py", line 52, in directory_name result = clean_filename(initial_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\edx-dl\edx_dl\utils.py", line 126, in clean_filename s = h.unescape(s) ^^^^^^^^^^ AttributeError: 'HTMLParser' object has no attribute 'unescape'

csyezheng commented 9 months ago

Hi, @FrankWorldview, Python 3.7 is tested, Python 3.11 is not supported yet. This project has not been maintained for a long time. This time it is fixed to a working version based on the previously supported Python version. Later I will fix it to be compatible with the latest Python version.