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.93k stars 640 forks source link

Downloading edx subtitles separately (after having already downloaded videos) sometimes "attaches" subtitles to wrong file #611

Open JohnVeness opened 4 years ago

JohnVeness commented 4 years 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

When I first used edx-dl, I didn't realise that it wouldn't download subtitles by default. Once I discovered why, I ran the command again including the "-s" option and was pleased to see that it was downloading just the subtitles and skipping the already downloaded videos.

However, some of the .srt files were given the incorrect prefix filename. In particular, they were given names such as 02-handouts_6002-L0-oei12-gaps-annotated.en.srt where 02-handouts_6002-L0-oei12-gaps-annotated.pdf is a PDF, not a video!

Your environment

Steps to reproduce

  1. edx-dl -u <censored> https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/course/ --filter-section 2
  2. Wait for it to download all the videos and PDFs
  3. edx-dl -s -u <censored> https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/course/ --filter-section 2
  4. Wait for it to download all the subtitles

Expected behaviour

The .srt files should have the same base name as the corresponding video.

Actual behaviour

Some .srt files have the incorrect base name. Output:

$ edx-dl -u <censored> https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/course/ --filter-section 2
edx_dl version 0.1.13
Building initial headers for future requests.
Getting initial CSRF token.
Found CSRF token.
Logging into Open edX site: https://courses.edx.org/login_ajax
Extracting course information from dashboard.
Filtering sections
Sections filtered to: 2
Downloading Circuits and Electronics 1: Basic Circuit Analysis [course-v1:MITx+6.002.1x+2T2019/co]
Downloading 1 section(s)
Section  2: Overview
  Introduction to Circuits and Electronics
  Using the Tools
  Circuit Sandbox
Extracting all units information in parallel.
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Welcome'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Using_the_Tools'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Circuit_Sandbox'
Removed 2 duplicated urls from 30 in total
Output directory: Downloaded
[download] https://edx-video.net/mit-6002x/MIT6002XT214-I010201_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/01-MIT6002XT214-I010201_DTH.mp4
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V060600_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-MIT6002XT214-V060600_DTH.mp4
[download] https://courses.edx.org/assets/courseware/v1/c12aa692609129061b269b5bf7e412a8/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L0-oei12-gaps.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-handouts_6002-L0-oei12-gaps.pdf
[download] https://courses.edx.org/assets/courseware/v1/5db6b214552f617fefa16ca7c6390ae6/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L0-oei12-gaps-annotated.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-handouts_6002-L0-oei12-gaps-annotated.pdf
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V002700_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-MIT6002XT214-V002700_DTH.mp4
[download] https://courses.edx.org/assets/courseware/v1/844b34b8b331d7939ec64c0d690bb4e3/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L1-oei12-gaps.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-handouts_6002-L1-oei12-gaps.pdf
[download] https://courses.edx.org/assets/courseware/v1/622f0044fda2cc848d22bc881310d9d7/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L1-oei12-gaps-annotated.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-handouts_6002-L1-oei12-gaps-annotated.pdf
[download] https://edx-video.net/mit-6002x/MIT6002XT214-J100101_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/04-MIT6002XT214-J100101_DTH.mp4
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V061200_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/05-MIT6002XT214-V061200_DTH.mp4
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V061100_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/06-MIT6002XT214-V061100_DTH.mp4
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V061300_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/07-MIT6002XT214-V061300_DTH.mp4
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V061000_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/08-MIT6002XT214-V061000_DTH.mp4
$ edx-dl -s -u <censored> https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/course/ --filter-section 2
edx_dl version 0.1.13
Building initial headers for future requests.
Getting initial CSRF token.
Found CSRF token.
Logging into Open edX site: https://courses.edx.org/login_ajax
Extracting course information from dashboard.
Filtering sections
Sections filtered to: 2
Downloading Circuits and Electronics 1: Basic Circuit Analysis [course-v1:MITx+6.002.1x+2T2019/co]
Downloading 1 section(s)
Section  2: Overview
  Introduction to Circuits and Electronics
  Using the Tools
  Circuit Sandbox
Extracting all units information in parallel.
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Welcome'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Using_the_Tools'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Circuit_Sandbox'
Removed 2 duplicated urls from 30 in total
Output directory: Downloaded
[skipping] https://edx-video.net/mit-6002x/MIT6002XT214-I010201_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/01-MIT6002XT214-I010201_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@Welcome/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/01-MIT6002XT214-I010201_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@Welcome/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/01-MIT6002XT214-I010201_DTH.en.srt
[skipping] https://edx-video.net/mit-6002x/MIT6002XT214-V060600_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-MIT6002XT214-V060600_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@d8b7197ab92044f189728ed61b968781/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-handouts_6002-L0-oei12-gaps-annotated.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@d8b7197ab92044f189728ed61b968781/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-handouts_6002-L0-oei12-gaps-annotated.en.srt
[skipping] https://courses.edx.org/assets/courseware/v1/c12aa692609129061b269b5bf7e412a8/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L0-oei12-gaps.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-handouts_6002-L0-oei12-gaps.pdf
[skipping] https://courses.edx.org/assets/courseware/v1/5db6b214552f617fefa16ca7c6390ae6/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L0-oei12-gaps-annotated.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-handouts_6002-L0-oei12-gaps-annotated.pdf
[skipping] https://edx-video.net/mit-6002x/MIT6002XT214-V002700_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-MIT6002XT214-V002700_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@8e360e1870e34a1bb3348f9d760d36be/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-handouts_6002-L1-oei12-gaps.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@8e360e1870e34a1bb3348f9d760d36be/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-handouts_6002-L1-oei12-gaps.en.srt
[skipping] https://courses.edx.org/assets/courseware/v1/844b34b8b331d7939ec64c0d690bb4e3/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L1-oei12-gaps.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-handouts_6002-L1-oei12-gaps.pdf
[skipping] https://courses.edx.org/assets/courseware/v1/622f0044fda2cc848d22bc881310d9d7/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L1-oei12-gaps-annotated.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-handouts_6002-L1-oei12-gaps-annotated.pdf
[skipping] https://edx-video.net/mit-6002x/MIT6002XT214-J100101_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/04-MIT6002XT214-J100101_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@e54854f1abab4936b0e4d3f7e90d5ae7/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/04-MIT6002XT214-J100101_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@e54854f1abab4936b0e4d3f7e90d5ae7/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/04-MIT6002XT214-J100101_DTH.en.srt
[skipping] https://edx-video.net/mit-6002x/MIT6002XT214-V061200_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/05-MIT6002XT214-V061200_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/05-MIT6002XT214-V061200_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/05-MIT6002XT214-V061200_DTH.en.srt
[skipping] https://edx-video.net/mit-6002x/MIT6002XT214-V061100_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/06-MIT6002XT214-V061100_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_DC_Analysis/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/06-MIT6002XT214-V061100_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_DC_Analysis/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/06-MIT6002XT214-V061100_DTH.en.srt
[skipping] https://edx-video.net/mit-6002x/MIT6002XT214-V061300_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/07-MIT6002XT214-V061300_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_Transient_Analysis/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/07-MIT6002XT214-V061300_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_Transient_Analysis/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/07-MIT6002XT214-V061300_DTH.en.srt
[skipping] https://edx-video.net/mit-6002x/MIT6002XT214-V061000_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/08-MIT6002XT214-V061000_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_AC_Analysis/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/08-MIT6002XT214-V061000_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_AC_Analysis/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/08-MIT6002XT214-V061000_DTH.en.srt

Note that the mismatch problem only seems to occur if you download the videos and PDFs in one command, then attempt to download the subtitles in a separate command subsequently (so that it skips the already downloaded videos and PDFs). If you use the -s version in the first instance, while in an empty directory, the .srt files get the correct filenames. See:

$ edx-dl -s -u <censored> https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/course/ --filter-section 2
edx_dl version 0.1.13
Building initial headers for future requests.
Getting initial CSRF token.
Found CSRF token.
Logging into Open edX site: https://courses.edx.org/login_ajax
Extracting course information from dashboard.
Filtering sections
Sections filtered to: 2
Downloading Circuits and Electronics 1: Basic Circuit Analysis [course-v1:MITx+6.002.1x+2T2019/co]
Downloading 1 section(s)
Section  2: Overview
  Introduction to Circuits and Electronics
  Using the Tools
  Circuit Sandbox
Extracting all units information in parallel.
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Welcome'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Using_the_Tools'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Circuit_Sandbox'
Removed 2 duplicated urls from 30 in total
Output directory: Downloaded
[download] https://edx-video.net/mit-6002x/MIT6002XT214-I010201_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/01-MIT6002XT214-I010201_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@Welcome/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/01-MIT6002XT214-I010201_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@Welcome/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/01-MIT6002XT214-I010201_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V060600_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-MIT6002XT214-V060600_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@d8b7197ab92044f189728ed61b968781/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-MIT6002XT214-V060600_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@d8b7197ab92044f189728ed61b968781/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-MIT6002XT214-V060600_DTH.en.srt
[download] https://courses.edx.org/assets/courseware/v1/c12aa692609129061b269b5bf7e412a8/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L0-oei12-gaps.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-handouts_6002-L0-oei12-gaps.pdf
[download] https://courses.edx.org/assets/courseware/v1/5db6b214552f617fefa16ca7c6390ae6/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L0-oei12-gaps-annotated.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/02-handouts_6002-L0-oei12-gaps-annotated.pdf
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V002700_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-MIT6002XT214-V002700_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@8e360e1870e34a1bb3348f9d760d36be/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-MIT6002XT214-V002700_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@8e360e1870e34a1bb3348f9d760d36be/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-MIT6002XT214-V002700_DTH.en.srt
[download] https://courses.edx.org/assets/courseware/v1/844b34b8b331d7939ec64c0d690bb4e3/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L1-oei12-gaps.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-handouts_6002-L1-oei12-gaps.pdf
[download] https://courses.edx.org/assets/courseware/v1/622f0044fda2cc848d22bc881310d9d7/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L1-oei12-gaps-annotated.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/03-handouts_6002-L1-oei12-gaps-annotated.pdf
[download] https://edx-video.net/mit-6002x/MIT6002XT214-J100101_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/04-MIT6002XT214-J100101_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@e54854f1abab4936b0e4d3f7e90d5ae7/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/04-MIT6002XT214-J100101_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@e54854f1abab4936b0e4d3f7e90d5ae7/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/04-MIT6002XT214-J100101_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V061200_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/05-MIT6002XT214-V061200_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/05-MIT6002XT214-V061200_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/05-MIT6002XT214-V061200_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V061100_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/06-MIT6002XT214-V061100_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_DC_Analysis/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/06-MIT6002XT214-V061100_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_DC_Analysis/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/06-MIT6002XT214-V061100_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V061300_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/07-MIT6002XT214-V061300_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_Transient_Analysis/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/07-MIT6002XT214-V061300_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_Transient_Analysis/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/07-MIT6002XT214-V061300_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V061000_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/08-MIT6002XT214-V061000_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_AC_Analysis/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/08-MIT6002XT214-V061000_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@edX_Tutorial_Circuit_Simulator_-_AC_Analysis/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/02-Overview/08-MIT6002XT214-V061000_DTH.zh.srt
JohnVeness commented 4 years ago

Having examined the code more, the problem is in _build_subtitles_downloads which calls get_filename_from_prefix passing a prefix like "02". This is fine if the first file found in the directory starting "02" is the video file, but no good if the first file found in the directory starting "02" is, say, a PDF file. Fixing this is beyond my abilities, though!