Skip to content

Instantly share code, notes, and snippets.

View james-prickett's full-sized avatar

James Prickett james-prickett

View GitHub Profile
@james-prickett
james-prickett / imdb_scrapper.py
Created March 6, 2011 18:12
A simple screen scrapper to pull IMDB ID's
from lxml.html import parse
class ImdbService(object):
def get_ids_from_page(self, url):
ids = []
links = parse(url).xpath('//a/@href[contains(.,"/title/")]')
for link in links:
ids.append(link[len('/title/'):len(link) - 1])