Git Product home page Git Product logo

mit-ocw-dl's Introduction

MIT-OCW Downloader

Download all video lectures from a MIT-OCW course with a single command.

Features

  • Intentionally detailed names, so that it will display and sort properly on most interfaces (e.g., MX Video, or VLC on Android devices).
  • URL and lecture name filters to download only video files.
  • Tested on Linux, and Mac (Python 2.7).

Instructions

  • mit-ocw-dl basically needs a link to the video lectures page of a MIT-OCW course (which of course has video lectures) and a computer that runs python.
  • Put the download.py file in the location you want the videos to be downloaded.
  • Get the link to the video lectures page of a MIT-OCW course.
  • Open up a shell-wizard and navigate to the location.
  • Type python download.py link
  • Enjoy !

Coming Up

*mit-ocw-dl only supports video content of the course presently but attempts are on to make it download entire contents (lecture slides, assignments, solutions etc.)

Bugs Reporting and Contribution

Shoot a mail at [email protected]

##Author Meet Shah

Inspiration

coursera-dl/coursera

mit-ocw-dl's People

Contributors

ankit-gaur avatar meetps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mit-ocw-dl's Issues

Failed to download with error

./download.py https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/video-lectures/
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9199.
from: can't read /var/mail/HTMLParser
./download.py: 6: ./download.py: base_url: not found
./download.py: 7: ./download.py: lec_url_list: not found
./download.py: 8: ./download.py: video_url_list: not found
./download.py: 9: ./download.py: vid_name_list: not found
./download.py: 10: ./download.py: video_url_list_final: not found
./download.py: 12: ./download.py: Syntax error: "(" unexpected

Failing to download... no error given

This is my input
python2.7 download.py https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-design-and-analysis-of-algorithms-spring-2015/lecture-videos/

I'm very confused

sorry, I'm not much of a programmer. I don't know if this is compatible in windows, specifically 10.

I tried looking for what exactly a shell wizard is. I thought it meant like using either the power shell or using the python console but they both kind of gives these syntax error messages. I then copied the download python file to the tools section of the python folder by my interpretation on what the
location meant in order to see if that would change anything, but it didn't work.

urllib.error.HTTPError: HTTP Error 301: The HTTP server returned a redirect error that would lead to an infinite loop.

nixos

 ✘  ~/projects/mit-ocw-dl   master  python3 python3.x/download.py https://ocw.mit.edu/courses/14-01sc-principles-of-microeconomics-fall-2011/video-lectures/
Traceback (most recent call last):
  File "/home/srghma/projects/mit-ocw-dl/python3.x/download.py", line 56, in <module>
    f = urllib.request.urlopen(str(sys.argv[1]))
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/urllib/request.py", line 738, in http_error_302
    raise HTTPError(req.full_url, code,
urllib.error.HTTPError: HTTP Error 301: The HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
redirect

Fix global variable vid_url_list_final

This variable "vid_url_list_final" must be "video_url_list_final" for making this work.
Also you could consider remove "import os" because is not used and respect PEP8.

What a great project, so helpful, thanks for make it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.