Personal tools
You are here: Home Weblog youtube

youtube


2008-01-28

Monty Python sketches and download script

Filed Under:

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.

Weblog
Atom
RDF
RSS 2.0
Powered by Quills
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: