Created
March 12, 2012 22:12
-
-
Save miratcan/2025029 to your computer and use it in GitHub Desktop.
downloads coursera videos.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
from BeautifulSoup import BeautifulSoup | |
from subprocess import call | |
for id in range(19, 54): | |
page = urllib2.urlopen("https://www.coursera.org/modelthinking/lecture/preview_view?lecture_id=%s" % id) | |
soup = BeautifulSoup(page) | |
video_tag = soup.find("source", attrs={'type': "video/ogg"}) | |
call(["wget", "%s" % video_tag['src']]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment