Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added filename sanitization for non-video resources #556

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EugeneLoy
Copy link
Contributor

This adds sanitization to filenames given to non-video resources.

At the moment filename for non-video resources is derived from resource url, which may contain non-fs-friendly characters.

For example, running:

edx-dl --dry-run -u <username> https://courses.edx.org/courses/course-v1:MITx+18.6501x+3T2019/course/

... schedules download:

...
[skipping] https://courses.edx.org/asset-v1:MITx+18.6501x+3T2019+type@asset+block@lectureslides_chap1_annot.pdf => Downloaded\Fundamentals_of_Statistics\02-Unit_1_Introduction_to_statistics\02-asset-v1:MITx+18.6501x+3T2019+type@asset+block@lectureslides_chap1_annot.pdf
...

... (note : character that is used in destination filename and is not fs-friendly).

This results in silent failure to download affected resources.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 47.7% when pulling 12e1702 on EugeneLoy:master into 265718c on coursera-dl:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants