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 638 forks source link

IndexError: list index out of range #16

Closed togaurav closed 10 years ago

togaurav commented 11 years ago

Hi Guys First I would like to thank you for creating such a wonderful script, actually you saved my precious time.

I tried to download the "CS50x Introduction to Computer Science I" course content then I got into a issue, here is stack-trace

You can access 13 courses on edX 1 - CS169.1x Software as a Service -> Started 2 - CS169.1x Software as a Service -> Started 3 - CS169.2x Software as a Service -> Started 4 - CS184.1x Foundations of Computer Graphics -> Started 5 - CS188.1x Artificial Intelligence -> Started 6 - CS188.1x Artificial Intelligence -> Started 7 - CS191x Quantum Mechanics and Quantum Computation -> Started 8 - CS50x Introduction to Computer Science I -> Started 9 - 6.00x Introduction to Computer Science and Programming -> Started 10 - 6.00x Introduction to Computer Science and Programming -> Started 11 - 8.02x Electricity and Magnetism -> Started 12 - UT.2.01x Ideas of the 20th Century -> Not yet 13 - UT.3.01x Age of Globalization -> Not yet Enter Course Number: 8 CS50x Introduction to Computer Science I has 12 weeks so far 1 - Download Week 0 videos 2 - Download Week 1 videos 3 - Download Week 2 videos 4 - Download Week 3 videos 5 - Download Week 4 videos 6 - Download Week 5 videos 7 - Download Week 6 videos 8 - Download Week 7 videos 9 - Download Week 8 videos 10 - Download Week 9 videos 11 - Download Week 10 videos 12 - Download Week 11 videos 13 - Download them all Enter Your Choice: 13 Processing 'https://www.edx.org/courses/HarvardX/CS50x/2012/courseware/Week_0/week0w/'... Processing 'https://www.edx.org/courses/HarvardX/CS50x/2012/courseware/Week_0/week0f/'... ..... ..... ..... ..... ..... Processing 'https://www.edx.org/courses/HarvardX/CS50x/2012/courseware/Week_10/week10m/'... Processing 'https://www.edx.org/courses/HarvardX/CS50x/2012/courseware/Week_11/week11m/'... Traceback (most recent call last): File "edx-dl.py", line 185, in os.system('youtube-dl -F %s' % video_link[-1]) IndexError: list index out of range

Thanks

shk3 commented 11 years ago

Sorry for the delayed reply. I am not able to test the youtube module now as I am not able to access youtube. Is there any clip having been downloaded before the error appearing?

togaurav commented 11 years ago

Hi No it did not download any content, I think the videos of CS50x are streaming from other websites, its not streaming form you-tube, anyway I got torrent of CS50x Thanks

shk3 commented 11 years ago

Oh, yes! The pages are totally different from the other courses. That is the problem.

shk3 commented 11 years ago

@rbrito @iemejia , there are some courses like this one using a totally different video hosting service. Is that possible to solve such kind of problems? (Making separated scripts for such courses will be crazy actually, but I think our users need to download)

rbrito commented 11 years ago

I would have to take a look at the course pages to see what needs to be done.

On the other hand, the script, almost as is, can be used to download videos from courses offered by other initiatives (like https://education.10gen.com/ ), as they are based on edx.

Strange to find such problems with edx themselves. :) They must be in the middle of a deployment of another version of their platform.

mahathepavan commented 11 years ago

I noticed it is closed., Is there any fix or a workaround for this issue ?

shk3 commented 11 years ago

Hi @mahathepavan , We found the problem in this issue is not a general problem. That course does not use youtube to host there video. As the layout of this course is totally different from most other courses in edx, we will not fix this issue. Are you facing the same problem on the same course?

agent001 commented 11 years ago

I once downloaded "Stat2.1x Introduction to Statistics: Descriptive Statistics" but unable to download the same course now. I seem to have the same error on all courses. Please guide.

os.system('youtube-dl -F %s' % video_link[-1])

IndexError: list index out of range

shk3 commented 11 years ago

@agent001 Do you mean CS50x or Stat2.1x?

rbrito commented 11 years ago

@agent001, is that because of the layout changes to recent edX? Can you try the change proposed in issue #32, please? If that works, then I will commit that fix.

duvin commented 11 years ago

@rbrito the #32 change fixed it for me

agent001 commented 11 years ago

Hi, still having the error for Stat2.1x. Have been using commit 3704630, Python 2.7.5, youtube-dl version is 2013.07.19

7 - Download them all Enter Your Choice: 1 Processing 'https://courses.edx.org/courses/BerkeleyX/Stat2.1x/2013_Spring/courseware/847291eea63447c485e96d34b99e5a23/9565a679e4d44bee9f3aeb2a787f0b80/'... Processing 'https://courses.edx.org/courses/BerkeleyX/Stat2.1x/2013_Spring/courseware/847291eea63447c485e96d34b99e5a23/212c9504070f4afa9f39c39dc351036f/'... Traceback (most recent call last): File "/usr/bin/edx-dl", line 191, in os.system('youtube-dl -F %s' % video_link[-1]) IndexError: list index out of range

agent001 commented 11 years ago

Ran python -v and found the below errors, is it possible to verify if all prerequisite library/version are installed at start. Please suggest what should be the action to fix these.

can't create /usr/lib/python2.7/encodings/ascii.pyc can't create /usr/lib/python2.7/xml/etree/cElementTree.pyc can't create /usr/lib/python2.7/xml/sax/init.pyc can't create /usr/lib/python2.7/xml/sax/xmlreader.pyc can't create /usr/lib/python2.7/xml/sax/handler.pyc can't create /usr/lib/python2.7/xml/sax/_exceptions.pyc can't create /usr/lib/python2.7/xml/sax/saxutils.pyc can't create /usr/lib/python2.7/inspect.pyc can't create /usr/lib/python2.7/dis.pyc can't create /usr/lib/python2.7/opcode.pyc can't create /usr/lib/python2.7/tokenize.pyc can't create /usr/lib/python2.7/token.pyc can't create /usr/lib/python2.7/encodings/idna.pyc can't create /usr/lib/python2.7/stringprep.pyc

iemejia commented 10 years ago

I'm closing this since it's almost five months old and nobody else has reported this issue.