Monty Python sketches and download script

A friend pointed me to a page with many many links to Monty Python sketches videos.

Being a Monty Python fan, I've countered with this script:

#!/usr/bin/python2.4
downloader = "/home/tibi/Software/youtube-dl.py '%s' -o '%s'"
url = "http://onemansblog.com/2006/12/01/a-compendium-of-150-monty-python-sketches/"

import lxml.html
import urllib
import os

content  = urllib.urlopen(url)
etree = lxml.html.parse(content)
links = etree.xpath('//ol/li/a')

for link in links:
    print "Downloading ", link.text
    cmd = downloader %  (link.get('href'), link.text + '.flv')
    print os.popen(cmd).read()

It needs the YouTube downloader script and lxml 2.0.

Comments