Skip to content

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