Skip to content

Instantly share code, notes, and snippets.

@edsu
Created December 20, 2009 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/260361 to your computer and use it in GitHub Desktop.
Save edsu/260361 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
"""
Extract some RDF from O'Reilly's not well-formed Book Catalog RDFa.
"""
from rdflib.graph import ConjunctiveGraph
g = ConjunctiveGraph()
g.parse('http://oreilly.com/catalog/9780596516499/', format='rdfa', lax=True)
print g.serialize()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment